Configure R1
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
no ip dhcp use vrf connected
!
ip dhcp pool Vlan10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.2
dns-server 8.8.8.8
!
ip dhcp pool Vlan20
network 192.168.20.0 255.255.255.0
default-router 192.168.20.2
dns-server 8.8.8.8
!
ip dhcp pool Vlan30
network 192.168.30.0 255.255.255.0
default-router 192.168.30.2
dns-server 8.8.8.8
!
ip dhcp pool Vlan40
network 192.168.40.0 255.255.255.0
default-router 192.168.40.2
dns-server 8.8.8.8
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.11.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router rip
version 2
network 192.168.11.0
no auto-summary
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure R2
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.11.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.2 255.255.255.0
ip helper-address 192.168.11.1
no snmp trap link-status
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.20.2 255.255.255.0
ip helper-address 192.168.11.1
no snmp trap link-status
!
interface FastEthernet0/0.30
encapsulation dot1Q 30
ip address 192.168.30.2 255.255.255.0
ip helper-address 192.168.11.1
no snmp trap link-status
!
interface FastEthernet0/0.40
encapsulation dot1Q 40
ip address 192.168.40.2 255.255.255.0
ip helper-address 192.168.11.1
no snmp trap link-status
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router rip
version 2
network 192.168.10.0
network 192.168.11.0
network 192.168.20.0
network 192.168.30.0
network 192.168.40.0
no auto-summary
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW1
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW1
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
vtp file nvram:vlan.dat
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
spanning-tree vlan 10 priority 4096
spanning-tree vlan 20 priority 8192
spanning-tree vlan 30 priority 12288
spanning-tree vlan 40 priority 4096
!
!
!
!
interface FastEthernet0/0
no ip address
spanning-tree portfast
!
interface FastEthernet0/1
no ip address
spanning-tree portfast
!
interface FastEthernet0/2
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/3
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/4
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/5
no ip address
spanning-tree portfast
!
interface FastEthernet0/6
no ip address
spanning-tree portfast
!
interface FastEthernet0/7
no ip address
spanning-tree portfast
!
interface FastEthernet0/8
no ip address
spanning-tree portfast
!
interface FastEthernet0/9
no ip address
spanning-tree portfast
!
interface FastEthernet0/10
no ip address
spanning-tree portfast
!
interface FastEthernet0/11
no ip address
spanning-tree portfast
!
interface FastEthernet0/12
no ip address
spanning-tree portfast
!
interface FastEthernet0/13
no ip address
spanning-tree portfast
!
interface FastEthernet0/14
no ip address
spanning-tree portfast
!
interface FastEthernet0/15
no ip address
spanning-tree portfast
!
interface Vlan1
no ip address
shutdown
!
ip http server
ip classless
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW2
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW2
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
vtp file nvram:vlan.dat
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
spanning-tree vlan 10 priority 12288
spanning-tree vlan 20 priority 4096
spanning-tree vlan 30 priority 8192
spanning-tree vlan 40 priority 12288
!
!
!
!
interface FastEthernet0/0
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/1
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/2
no ip address
spanning-tree portfast
!
interface FastEthernet0/3
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/4
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/5
no ip address
spanning-tree portfast
!
interface FastEthernet0/6
no ip address
spanning-tree portfast
!
interface FastEthernet0/7
no ip address
spanning-tree portfast
!
interface FastEthernet0/8
no ip address
spanning-tree portfast
!
interface FastEthernet0/9
no ip address
spanning-tree portfast
!
interface FastEthernet0/10
no ip address
spanning-tree portfast
!
interface FastEthernet0/11
no ip address
spanning-tree portfast
!
interface FastEthernet0/12
no ip address
spanning-tree portfast
!
interface FastEthernet0/13
no ip address
spanning-tree portfast
!
interface FastEthernet0/14
no ip address
spanning-tree portfast
!
interface FastEthernet0/15
no ip address
spanning-tree portfast
!
interface Vlan1
no ip address
shutdown
!
ip http server
ip classless
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW3
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW3
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
vtp file nvram:vlan.dat
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
spanning-tree vlan 10 priority 8192
spanning-tree vlan 20 priority 12288
spanning-tree vlan 30 priority 4096
spanning-tree vlan 40 priority 8192
!
!
!
!
interface FastEthernet0/0
switchport access vlan 10
no ip address
spanning-tree portfast
!
interface FastEthernet0/1
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/2
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/3
switchport access vlan 10
no ip address
spanning-tree portfast
!
interface FastEthernet0/4
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/5
switchport access vlan 10
no ip address
spanning-tree portfast
!
interface FastEthernet0/6
switchport access vlan 10
no ip address
spanning-tree portfast
!
interface FastEthernet0/7
switchport access vlan 20
no ip address
spanning-tree portfast
!
interface FastEthernet0/8
switchport access vlan 20
no ip address
spanning-tree portfast
!
interface FastEthernet0/9
switchport access vlan 20
no ip address
spanning-tree portfast
!
interface FastEthernet0/10
switchport access vlan 30
no ip address
spanning-tree portfast
!
interface FastEthernet0/11
switchport access vlan 30
no ip address
spanning-tree portfast
!
interface FastEthernet0/12
switchport access vlan 30
no ip address
spanning-tree portfast
!
interface FastEthernet0/13
switchport access vlan 40
no ip address
spanning-tree portfast
!
interface FastEthernet0/14
switchport access vlan 40
no ip address
spanning-tree portfast
!
interface FastEthernet0/15
switchport access vlan 40
no ip address
spanning-tree portfast
!
interface Vlan1
no ip address
shutdown
!
ip http server
ip classless
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW4
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW4
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
vtp file nvram:vlan.dat
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface FastEthernet0/0
no ip address
spanning-tree portfast
!
interface FastEthernet0/1
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/2
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/3
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/4
no ip address
spanning-tree portfast
!
interface FastEthernet0/5
no ip address
spanning-tree portfast
!
interface FastEthernet0/6
no ip address
spanning-tree portfast
!
interface FastEthernet0/7
no ip address
spanning-tree portfast
!
interface FastEthernet0/8
no ip address
spanning-tree portfast
!
interface FastEthernet0/9
no ip address
spanning-tree portfast
!
interface FastEthernet0/10
no ip address
spanning-tree portfast
!
interface FastEthernet0/11
no ip address
spanning-tree portfast
!
interface FastEthernet0/12
no ip address
spanning-tree portfast
!
interface FastEthernet0/13
no ip address
spanning-tree portfast
!
interface FastEthernet0/14
no ip address
spanning-tree portfast
!
interface FastEthernet0/15
no ip address
spanning-tree portfast
!
interface Vlan1
no ip address
shutdown
!
ip http server
ip classless
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
---------------The end-----------------
Thứ Năm, 26 tháng 5, 2011
Lab1 VLAN VTP
Configure R1
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
no ip dhcp use vrf connected
!
ip dhcp pool Vlan1
network 172.16.1.0 255.255.255.0
default-router 172.16.1.2
dns-server 8.8.8.8
!
ip dhcp pool Vlan3
network 172.16.3.0 255.255.255.0
default-router 172.16.3.2
dns-server 8.8.8.8
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.13.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 172.16.11.1 255.255.255.0
duplex auto
speed auto
!
router rip
version 2
network 172.16.0.0
network 192.168.13.0
no auto-summary
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure R2
!
!
version 12.4
service config
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 172.16.11.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 172.16.1.2 255.255.255.0
ip helper-address 172.16.11.1
no snmp trap link-status
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 172.16.2.2 255.255.255.0
ip helper-address 192.168.13.3
no snmp trap link-status
!
interface FastEthernet0/0.3
encapsulation dot1Q 3
ip address 172.16.3.2 255.255.255.0
ip helper-address 172.16.11.1
no snmp trap link-status
!
interface FastEthernet0/0.4
encapsulation dot1Q 4
ip address 172.16.4.2 255.255.255.0
ip helper-address 192.168.13.3
no snmp trap link-status
!
interface FastEthernet0/1
ip address dhcp
duplex auto
speed auto
!
router rip
version 2
network 172.16.0.0
no auto-summary
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure R3
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
no ip dhcp use vrf connected
!
ip dhcp pool Vlan2
network 172.16.2.0 255.255.255.0
default-router 172.16.2.2
dns-server 8.8.8.8
!
ip dhcp pool vlan4
network 172.16.4.0 255.255.255.0
default-router 172.16.4.2
dns-server 8.8.8.8
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.13.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router rip
version 2
network 192.168.13.0
no auto-summary
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure Client
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Client
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
vtp file nvram:vlan.dat
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface FastEthernet0/0
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/1
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/2
no ip address
spanning-tree portfast
!
interface FastEthernet0/3
no ip address
spanning-tree portfast
!
interface FastEthernet0/4
no ip address
spanning-tree portfast
!
interface FastEthernet0/5
no ip address
spanning-tree portfast
!
interface FastEthernet0/6
switchport access vlan 2
no ip address
spanning-tree portfast
!
interface FastEthernet0/7
switchport access vlan 2
no ip address
spanning-tree portfast
!
interface FastEthernet0/8
switchport access vlan 2
no ip address
spanning-tree portfast
!
interface FastEthernet0/9
switchport access vlan 2
no ip address
spanning-tree portfast
!
interface FastEthernet0/10
switchport access vlan 3
no ip address
spanning-tree portfast
!
interface FastEthernet0/11
switchport access vlan 3
no ip address
spanning-tree portfast
!
interface FastEthernet0/12
switchport access vlan 3
no ip address
spanning-tree portfast
!
interface FastEthernet0/13
switchport access vlan 3
no ip address
spanning-tree portfast
!
interface FastEthernet0/14
switchport access vlan 4
no ip address
spanning-tree portfast
!
interface FastEthernet0/15
switchport access vlan 4
no ip address
spanning-tree portfast
!
interface Vlan1
no ip address
shutdown
!
ip http server
ip classless
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Tran
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
vtp file nvram:vlan.dat
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface FastEthernet0/0
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/1
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/2
no ip address
spanning-tree portfast
!
interface FastEthernet0/3
no ip address
spanning-tree portfast
!
interface FastEthernet0/4
no ip address
spanning-tree portfast
!
interface FastEthernet0/5
no ip address
spanning-tree portfast
!
interface FastEthernet0/6
no ip address
spanning-tree portfast
!
interface FastEthernet0/7
no ip address
spanning-tree portfast
!
interface FastEthernet0/8
no ip address
spanning-tree portfast
!
interface FastEthernet0/9
no ip address
spanning-tree portfast
!
interface FastEthernet0/10
no ip address
spanning-tree portfast
!
interface FastEthernet0/11
no ip address
spanning-tree portfast
!
interface FastEthernet0/12
no ip address
spanning-tree portfast
!
interface FastEthernet0/13
no ip address
spanning-tree portfast
!
interface FastEthernet0/14
no ip address
spanning-tree portfast
!
interface FastEthernet0/15
no ip address
spanning-tree portfast
!
interface Vlan1
no ip address
shutdown
!
ip http server
ip classless
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
Configure Server
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Server
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
vtp file nvram:vlan.dat
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface FastEthernet0/0
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/1
no ip address
spanning-tree portfast
!
interface FastEthernet0/2
no ip address
spanning-tree portfast
!
interface FastEthernet0/3
no ip address
spanning-tree portfast
!
interface FastEthernet0/4
no ip address
spanning-tree portfast
!
interface FastEthernet0/5
no ip address
spanning-tree portfast
!
interface FastEthernet0/6
no ip address
spanning-tree portfast
!
interface FastEthernet0/7
no ip address
spanning-tree portfast
!
interface FastEthernet0/8
no ip address
spanning-tree portfast
!
interface FastEthernet0/9
no ip address
spanning-tree portfast
!
interface FastEthernet0/10
no ip address
spanning-tree portfast
!
interface FastEthernet0/11
no ip address
spanning-tree portfast
!
interface FastEthernet0/12
no ip address
spanning-tree portfast
!
interface FastEthernet0/13
no ip address
spanning-tree portfast
!
interface FastEthernet0/14
no ip address
spanning-tree portfast
!
interface FastEthernet0/15
no ip address
spanning-tree portfast
!
interface Vlan1
no ip address
shutdown
!
ip http server
ip classless
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
-----------------The End-------------
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
no ip dhcp use vrf connected
!
ip dhcp pool Vlan1
network 172.16.1.0 255.255.255.0
default-router 172.16.1.2
dns-server 8.8.8.8
!
ip dhcp pool Vlan3
network 172.16.3.0 255.255.255.0
default-router 172.16.3.2
dns-server 8.8.8.8
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.13.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 172.16.11.1 255.255.255.0
duplex auto
speed auto
!
router rip
version 2
network 172.16.0.0
network 192.168.13.0
no auto-summary
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure R2
!
!
version 12.4
service config
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 172.16.11.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 172.16.1.2 255.255.255.0
ip helper-address 172.16.11.1
no snmp trap link-status
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 172.16.2.2 255.255.255.0
ip helper-address 192.168.13.3
no snmp trap link-status
!
interface FastEthernet0/0.3
encapsulation dot1Q 3
ip address 172.16.3.2 255.255.255.0
ip helper-address 172.16.11.1
no snmp trap link-status
!
interface FastEthernet0/0.4
encapsulation dot1Q 4
ip address 172.16.4.2 255.255.255.0
ip helper-address 192.168.13.3
no snmp trap link-status
!
interface FastEthernet0/1
ip address dhcp
duplex auto
speed auto
!
router rip
version 2
network 172.16.0.0
no auto-summary
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure R3
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
no ip dhcp use vrf connected
!
ip dhcp pool Vlan2
network 172.16.2.0 255.255.255.0
default-router 172.16.2.2
dns-server 8.8.8.8
!
ip dhcp pool vlan4
network 172.16.4.0 255.255.255.0
default-router 172.16.4.2
dns-server 8.8.8.8
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.13.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router rip
version 2
network 192.168.13.0
no auto-summary
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure Client
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Client
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
vtp file nvram:vlan.dat
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface FastEthernet0/0
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/1
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/2
no ip address
spanning-tree portfast
!
interface FastEthernet0/3
no ip address
spanning-tree portfast
!
interface FastEthernet0/4
no ip address
spanning-tree portfast
!
interface FastEthernet0/5
no ip address
spanning-tree portfast
!
interface FastEthernet0/6
switchport access vlan 2
no ip address
spanning-tree portfast
!
interface FastEthernet0/7
switchport access vlan 2
no ip address
spanning-tree portfast
!
interface FastEthernet0/8
switchport access vlan 2
no ip address
spanning-tree portfast
!
interface FastEthernet0/9
switchport access vlan 2
no ip address
spanning-tree portfast
!
interface FastEthernet0/10
switchport access vlan 3
no ip address
spanning-tree portfast
!
interface FastEthernet0/11
switchport access vlan 3
no ip address
spanning-tree portfast
!
interface FastEthernet0/12
switchport access vlan 3
no ip address
spanning-tree portfast
!
interface FastEthernet0/13
switchport access vlan 3
no ip address
spanning-tree portfast
!
interface FastEthernet0/14
switchport access vlan 4
no ip address
spanning-tree portfast
!
interface FastEthernet0/15
switchport access vlan 4
no ip address
spanning-tree portfast
!
interface Vlan1
no ip address
shutdown
!
ip http server
ip classless
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
Configure Tran
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Tran
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
vtp file nvram:vlan.dat
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface FastEthernet0/0
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/1
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/2
no ip address
spanning-tree portfast
!
interface FastEthernet0/3
no ip address
spanning-tree portfast
!
interface FastEthernet0/4
no ip address
spanning-tree portfast
!
interface FastEthernet0/5
no ip address
spanning-tree portfast
!
interface FastEthernet0/6
no ip address
spanning-tree portfast
!
interface FastEthernet0/7
no ip address
spanning-tree portfast
!
interface FastEthernet0/8
no ip address
spanning-tree portfast
!
interface FastEthernet0/9
no ip address
spanning-tree portfast
!
interface FastEthernet0/10
no ip address
spanning-tree portfast
!
interface FastEthernet0/11
no ip address
spanning-tree portfast
!
interface FastEthernet0/12
no ip address
spanning-tree portfast
!
interface FastEthernet0/13
no ip address
spanning-tree portfast
!
interface FastEthernet0/14
no ip address
spanning-tree portfast
!
interface FastEthernet0/15
no ip address
spanning-tree portfast
!
interface Vlan1
no ip address
shutdown
!
ip http server
ip classless
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
Configure Server
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Server
!
logging queue-limit 100
!
ip subnet-zero
!
!
no ip domain lookup
!
vtp file nvram:vlan.dat
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface FastEthernet0/0
switchport mode trunk
no ip address
spanning-tree portfast
!
interface FastEthernet0/1
no ip address
spanning-tree portfast
!
interface FastEthernet0/2
no ip address
spanning-tree portfast
!
interface FastEthernet0/3
no ip address
spanning-tree portfast
!
interface FastEthernet0/4
no ip address
spanning-tree portfast
!
interface FastEthernet0/5
no ip address
spanning-tree portfast
!
interface FastEthernet0/6
no ip address
spanning-tree portfast
!
interface FastEthernet0/7
no ip address
spanning-tree portfast
!
interface FastEthernet0/8
no ip address
spanning-tree portfast
!
interface FastEthernet0/9
no ip address
spanning-tree portfast
!
interface FastEthernet0/10
no ip address
spanning-tree portfast
!
interface FastEthernet0/11
no ip address
spanning-tree portfast
!
interface FastEthernet0/12
no ip address
spanning-tree portfast
!
interface FastEthernet0/13
no ip address
spanning-tree portfast
!
interface FastEthernet0/14
no ip address
spanning-tree portfast
!
interface FastEthernet0/15
no ip address
spanning-tree portfast
!
interface Vlan1
no ip address
shutdown
!
ip http server
ip classless
!
!
!
!
call rsvp-sync
!
!
mgcp profile default
!
!
!
dial-peer cor custom
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
-----------------The End-------------
Lab Tong hop
Configure R1
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
ip helper-address 192.168.50.3
no snmp trap link-status
!
interface FastEthernet0/0.30
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
ip helper-address 192.168.50.3
no snmp trap link-status
!
interface FastEthernet0/0.40
encapsulation dot1Q 40
ip address 192.168.40.1 255.255.255.0
no snmp trap link-status
!
interface FastEthernet0/0.50
encapsulation dot1Q 50
ip address 192.168.50.1 255.255.255.0
ip helper-address 192.168.50.3
no snmp trap link-status
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 192.168.10.0 0.0.0.255 area 1
network 192.168.12.0 0.0.0.255 area 1
network 192.168.30.0 0.0.0.255 area 1
network 192.168.40.0 0.0.0.255 area 1
network 192.168.50.0 0.0.0.255 area 1
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure R2
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.23.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.20.2 255.255.255.0
ip helper-address 192.168.50.3
no snmp trap link-status
!
interface FastEthernet0/0.40
encapsulation dot1Q 40
ip address 192.168.40.2 255.255.255.0
ip helper-address 192.168.50.3
no snmp trap link-status
!
interface FastEthernet0/0.50
encapsulation dot1Q 50
ip address 192.168.50.2 255.255.255.0
no snmp trap link-status
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 192.168.20.0 0.0.0.255 area 1
network 192.168.23.0 0.0.0.255 area 1
network 192.168.40.0 0.0.0.255 area 1
network 192.168.50.0 0.0.0.255 area 1
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure R3
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
no ip dhcp use vrf connected
!
ip dhcp pool vlan10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 8.8.8.8
!
ip dhcp pool vlan20
network 192.168.20.0 255.255.255.0
default-router 192.168.20.2
dns-server 8.8.8.8
!
ip dhcp pool vlan30
network 192.168.30.0 255.255.255.0
default-router 192.168.30.1
dns-server 8.8.8.8
!
ip dhcp pool vlan40
network 192.168.40.0 255.255.255.0
default-router 192.168.40.2
dns-server 8.8.8.8
!
ip dhcp pool vlan50
network 192.168.50.0 255.255.255.0
default-router 192.168.50.1
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.50
encapsulation dot1Q 50
ip address 192.168.50.3 255.255.255.0
no snmp trap link-status
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 192.168.50.0 0.0.0.255 area 1
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW1
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree vlan 10 priority 4096
spanning-tree vlan 20 priority 4096
spanning-tree vlan 30 priority 4096
vtp file nvram:vlan.dat
archive
log config
hidekeys
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
!
interface FastEthernet1/1
!
interface FastEthernet1/2
switchport mode trunk
!
interface FastEthernet1/3
switchport mode trunk
!
interface FastEthernet1/4
switchport mode trunk
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
switchport access vlan 10
spanning-tree portfast
!
interface FastEthernet1/11
switchport access vlan 20
spanning-tree portfast
!
interface FastEthernet1/12
switchport access vlan 30
spanning-tree portfast
!
interface FastEthernet1/13
switchport access vlan 40
spanning-tree portfast
!
interface FastEthernet1/14
switchport access vlan 50
spanning-tree portfast
!
interface FastEthernet1/15
spanning-tree portfast
!
interface Vlan1
no ip address
!
interface Vlan10
no ip address
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW2
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree vlan 10 priority 8192
spanning-tree vlan 20 priority 8192
spanning-tree vlan 30 priority 8192
spanning-tree vlan 40 priority 12288
spanning-tree vlan 50 priority 12288
vtp file nvram:vlan.dat
archive
log config
hidekeys
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
switchport mode trunk
!
interface FastEthernet1/1
switchport mode trunk
!
interface FastEthernet1/2
!
interface FastEthernet1/3
switchport mode trunk
!
interface FastEthernet1/4
switchport mode trunk
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
no ip address
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW3
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree vlan 10 priority 12288
spanning-tree vlan 20 priority 12288
spanning-tree vlan 30 priority 12288
spanning-tree vlan 40 priority 8192
spanning-tree vlan 50 priority 8192
vtp file nvram:vlan.dat
archive
log config
hidekeys
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
switchport mode trunk
!
interface FastEthernet1/1
switchport mode trunk
!
interface FastEthernet1/2
switchport mode trunk
!
interface FastEthernet1/3
!
interface FastEthernet1/4
switchport mode trunk
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
no ip address
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW4
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree vlan 40 priority 4096
spanning-tree vlan 50 priority 4096
vtp file nvram:vlan.dat
archive
log config
hidekeys
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
switchport mode trunk
!
interface FastEthernet1/1
switchport mode trunk
!
interface FastEthernet1/2
switchport mode trunk
!
interface FastEthernet1/3
switchport mode trunk
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
no ip address
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
----------------The end-----------------------
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
ip helper-address 192.168.50.3
no snmp trap link-status
!
interface FastEthernet0/0.30
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
ip helper-address 192.168.50.3
no snmp trap link-status
!
interface FastEthernet0/0.40
encapsulation dot1Q 40
ip address 192.168.40.1 255.255.255.0
no snmp trap link-status
!
interface FastEthernet0/0.50
encapsulation dot1Q 50
ip address 192.168.50.1 255.255.255.0
ip helper-address 192.168.50.3
no snmp trap link-status
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 192.168.10.0 0.0.0.255 area 1
network 192.168.12.0 0.0.0.255 area 1
network 192.168.30.0 0.0.0.255 area 1
network 192.168.40.0 0.0.0.255 area 1
network 192.168.50.0 0.0.0.255 area 1
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure R2
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.23.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.20.2 255.255.255.0
ip helper-address 192.168.50.3
no snmp trap link-status
!
interface FastEthernet0/0.40
encapsulation dot1Q 40
ip address 192.168.40.2 255.255.255.0
ip helper-address 192.168.50.3
no snmp trap link-status
!
interface FastEthernet0/0.50
encapsulation dot1Q 50
ip address 192.168.50.2 255.255.255.0
no snmp trap link-status
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 192.168.20.0 0.0.0.255 area 1
network 192.168.23.0 0.0.0.255 area 1
network 192.168.40.0 0.0.0.255 area 1
network 192.168.50.0 0.0.0.255 area 1
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure R3
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef
no ip domain lookup
no ip dhcp use vrf connected
!
ip dhcp pool vlan10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 8.8.8.8
!
ip dhcp pool vlan20
network 192.168.20.0 255.255.255.0
default-router 192.168.20.2
dns-server 8.8.8.8
!
ip dhcp pool vlan30
network 192.168.30.0 255.255.255.0
default-router 192.168.30.1
dns-server 8.8.8.8
!
ip dhcp pool vlan40
network 192.168.40.0 255.255.255.0
default-router 192.168.40.2
dns-server 8.8.8.8
!
ip dhcp pool vlan50
network 192.168.50.0 255.255.255.0
default-router 192.168.50.1
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.50
encapsulation dot1Q 50
ip address 192.168.50.3 255.255.255.0
no snmp trap link-status
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 192.168.50.0 0.0.0.255 area 1
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW1
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree vlan 10 priority 4096
spanning-tree vlan 20 priority 4096
spanning-tree vlan 30 priority 4096
vtp file nvram:vlan.dat
archive
log config
hidekeys
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
!
interface FastEthernet1/1
!
interface FastEthernet1/2
switchport mode trunk
!
interface FastEthernet1/3
switchport mode trunk
!
interface FastEthernet1/4
switchport mode trunk
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
switchport access vlan 10
spanning-tree portfast
!
interface FastEthernet1/11
switchport access vlan 20
spanning-tree portfast
!
interface FastEthernet1/12
switchport access vlan 30
spanning-tree portfast
!
interface FastEthernet1/13
switchport access vlan 40
spanning-tree portfast
!
interface FastEthernet1/14
switchport access vlan 50
spanning-tree portfast
!
interface FastEthernet1/15
spanning-tree portfast
!
interface Vlan1
no ip address
!
interface Vlan10
no ip address
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW2
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree vlan 10 priority 8192
spanning-tree vlan 20 priority 8192
spanning-tree vlan 30 priority 8192
spanning-tree vlan 40 priority 12288
spanning-tree vlan 50 priority 12288
vtp file nvram:vlan.dat
archive
log config
hidekeys
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
switchport mode trunk
!
interface FastEthernet1/1
switchport mode trunk
!
interface FastEthernet1/2
!
interface FastEthernet1/3
switchport mode trunk
!
interface FastEthernet1/4
switchport mode trunk
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
no ip address
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW3
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree vlan 10 priority 12288
spanning-tree vlan 20 priority 12288
spanning-tree vlan 30 priority 12288
spanning-tree vlan 40 priority 8192
spanning-tree vlan 50 priority 8192
vtp file nvram:vlan.dat
archive
log config
hidekeys
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
switchport mode trunk
!
interface FastEthernet1/1
switchport mode trunk
!
interface FastEthernet1/2
switchport mode trunk
!
interface FastEthernet1/3
!
interface FastEthernet1/4
switchport mode trunk
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
no ip address
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
Configure SW4
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree vlan 40 priority 4096
spanning-tree vlan 50 priority 4096
vtp file nvram:vlan.dat
archive
log config
hidekeys
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
switchport mode trunk
!
interface FastEthernet1/1
switchport mode trunk
!
interface FastEthernet1/2
switchport mode trunk
!
interface FastEthernet1/3
switchport mode trunk
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
no ip address
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end
----------------The end-----------------------
Chủ Nhật, 22 tháng 5, 2011
VPN by SDM PPTP
Sử dụng router Cisco làm VPN server
Mô hình bài lab:
Các bước triển khai:
1.Cấu hình địa chỉ ip cho các cổng trên router
2.Định tuýên bằng OSPF
3.Sử dụng SDM để cấu hình VPN cho Cisco router
4.Cài đặt phần mềm Cisco VPN client
5.Thiết lập kết nối VPN
1.Cấu hình địa chỉ ip cho các cổng trên router
-Router ĐN
Code:
DN(config)#interface s0/1/1
DN(config-if)#description Ket noi den router EZVPN
DN(config-if)#ip address 172.16.4.2 255.255.255.0
DN(config)#interface fa0/1
DN(config-if)#description Ket noi den PCDN
DN(config-if)#ip address 172.16.1.1 255.255.255.0
-Router EZVPN
Code:
EZVPN(config)#interface s0/2/1
EZVPN(config-if)#description Ket noi den router DN
EZVPN(config-if)#ip address 172.16.4.1 255.255.255.0
EZVPN(config)#interface s0/1/0
EZVPN(config-if)#description Ket noi den router Internet
EZVPN(config-if)#ip address 172.16.6.1 255.255.255.0
EZVPN(config)#interface s0/1/1
EZVPN(config-if)#description Ket noi den router HCM
EZVPN(config-if)#ip address 172.16.5.1 255.255.255.0
EZVPN(config)#interface fa0/1
EZVPN(config-if)#description Ket noi den PC_LAN
EZVPN(config-if)#ip address 172.16.2.1 255.255.255.0
-Router HCM
Code:
HCM(config)#interface s0/1/1
HCM(config-if)#description Ket noi den router EZVPN
HCM(config-if)#ip address 172.16.5.2 255.255.255.0
HCM (config)#interface fa0/1
HCM (config-if)#description Ket noi den PCHCM
HCM (config-if)#ip address 172.16.3.1 255.255.255.0
-Router Internet
Code:
Internet(config)#interface s0/1/1
Internet(config-if)#description Ket noi den router EZVPN
Internet(config-if)#ip address 172.16.6.2 255.255.255.0
Internet (config)#interface fa0/1
Internet (config-if)#description Ket noi den VPN_Client
Internet (config-if)#ip address 172.16.7.1 255.255.255.0
2.Định tuýên bằng OSPF trên 3 router ĐN,EZVPN,HCM
-EZVPN
-EZVPN
Code:
EZVPN(config)#ip route 0.0.0.0 0.0.0.0 172.16.6.2
EZVPN(config)#router ospf 1
EZVPN(config-router)#network 172.16.4.0 0.0.0.255 area 0
EZVPN(config-router)#network 172.16.5.0 0.0.0.255 area 0
EZVPN(config-router)#network 172.16.2.0 0.0.0.255 area 0
EZVPN(config-router)#default-information originate (Quản bá default-route đến router HCM và DN )
-ĐN
Code:
DN(config)#router ospf 1
DN(config-router)#network 172.16.1.0 0.0.0.255 area 0
DN(config-router)#network 172.16.4.0 0.0.0.255 area 0
-HCM
Code:
HCM(config)#router ospf 1
HCM(config-router)#network 172.16.3.0 0.0.0.255 area 0
HCM(config-router)#network 172.16.5.0 0.0.0.255 area 0
Tiến hành kiểm tra lại bảng định tuyến trên các router ĐN,EZVPN,HCM
EZVPN#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.16.6.2 to network 0.0.0.0
172.16.0.0/24 is subnetted, 6 subnets
C 172.16.4.0 is directly connected, Serial0/2/1
C 172.16.5.0 is directly connected, Serial0/1/1
C 172.16.6.0 is directly connected, Serial0/1/0
O 172.16.1.0 [110/782] via 172.16.4.2, 00:01:52, Serial0/2/1
C 172.16.2.0 is directly connected, FastEthernet0/1
O 172.16.3.0 [110/782] via 172.16.5.2, 00:01:52, Serial0/1/1
S* 0.0.0.0/0 [1/0] via 172.16.6.2
HCM#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.16.5.1 to network 0.0.0.0
172.16.0.0/24 is subnetted, 5 subnets
O 172.16.4.0 [110/1562] via 172.16.5.1, 00:00:27, Serial0/1/1
C 172.16.5.0 is directly connected, Serial0/1/1
O 172.16.1.0 [110/1563] via 172.16.5.1, 00:00:27, Serial0/1/1
O 172.16.2.0 [110/782] via 172.16.5.1, 00:00:27, Serial0/1/1
C 172.16.3.0 is directly connected, FastEthernet0/1
O*E2 0.0.0.0/0 [110/1] via 172.16.5.1, 00:00:27, Serial0/1/1
DN#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.16.4.1 to network 0.0.0.0
172.16.0.0/24 is subnetted, 5 subnets
C 172.16.4.0 is directly connected, Serial0/1/1
O 172.16.5.0 [110/1562] via 172.16.4.1, 00:02:45, Serial0/1/1
C 172.16.1.0 is directly connected, FastEthernet0/1
O 172.16.2.0 [110/782] via 172.16.4.1, 00:02:45, Serial0/1/1
O 172.16.3.0 [110/1563] via 172.16.4.1, 00:02:45, Serial0/1/1
O*E2 0.0.0.0/0 [110/1] via 172.16.4.1, 00:02:45, Serial0/1/1
Chúng ta thấy rằng router HCM và ĐN tự động có 1 đường đi mặc định thông qua router tiếp theo là EZVPN ,điều này có được là nhờ lệnh EZVPN(config-router)#default-information originate trong lúc cấu hình định tuýên trên EZVPN router
Bây giờ chúng ta thử kiểm tra bẳng định tuýên trên router internet
Internet#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.6.0 is directly connected, Serial0/1/1
C 172.16.7.0 is directly connected, FastEthernet0/1
Do router Internet không chạy OSPF để trao đổi thông tin định tuýên với EZVPN router đồng nghĩa với việc không có khả năng đi điên 3 LAN của ĐN,HCM,EZVPN router
EZVPN#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.16.6.2 to network 0.0.0.0
172.16.0.0/24 is subnetted, 6 subnets
C 172.16.4.0 is directly connected, Serial0/2/1
C 172.16.5.0 is directly connected, Serial0/1/1
C 172.16.6.0 is directly connected, Serial0/1/0
O 172.16.1.0 [110/782] via 172.16.4.2, 00:01:52, Serial0/2/1
C 172.16.2.0 is directly connected, FastEthernet0/1
O 172.16.3.0 [110/782] via 172.16.5.2, 00:01:52, Serial0/1/1
S* 0.0.0.0/0 [1/0] via 172.16.6.2
HCM#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.16.5.1 to network 0.0.0.0
172.16.0.0/24 is subnetted, 5 subnets
O 172.16.4.0 [110/1562] via 172.16.5.1, 00:00:27, Serial0/1/1
C 172.16.5.0 is directly connected, Serial0/1/1
O 172.16.1.0 [110/1563] via 172.16.5.1, 00:00:27, Serial0/1/1
O 172.16.2.0 [110/782] via 172.16.5.1, 00:00:27, Serial0/1/1
C 172.16.3.0 is directly connected, FastEthernet0/1
O*E2 0.0.0.0/0 [110/1] via 172.16.5.1, 00:00:27, Serial0/1/1
DN#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.16.4.1 to network 0.0.0.0
172.16.0.0/24 is subnetted, 5 subnets
C 172.16.4.0 is directly connected, Serial0/1/1
O 172.16.5.0 [110/1562] via 172.16.4.1, 00:02:45, Serial0/1/1
C 172.16.1.0 is directly connected, FastEthernet0/1
O 172.16.2.0 [110/782] via 172.16.4.1, 00:02:45, Serial0/1/1
O 172.16.3.0 [110/1563] via 172.16.4.1, 00:02:45, Serial0/1/1
O*E2 0.0.0.0/0 [110/1] via 172.16.4.1, 00:02:45, Serial0/1/1
Chúng ta thấy rằng router HCM và ĐN tự động có 1 đường đi mặc định thông qua router tiếp theo là EZVPN ,điều này có được là nhờ lệnh EZVPN(config-router)#default-information originate trong lúc cấu hình định tuýên trên EZVPN router
Bây giờ chúng ta thử kiểm tra bẳng định tuýên trên router internet
Internet#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.6.0 is directly connected, Serial0/1/1
C 172.16.7.0 is directly connected, FastEthernet0/1
Do router Internet không chạy OSPF để trao đổi thông tin định tuýên với EZVPN router đồng nghĩa với việc không có khả năng đi điên 3 LAN của ĐN,HCM,EZVPN router
1.Cấu hình địa chỉ ip cho các cổng trên router
2.Định tuýên bằng OSPF
3.Sử dụng SDM để cấu hình VPN cho Cisco router
-Tiến hành cài đặt SDM cho router EZVPN , mọi người có thể tham khảo tại đây
http://www.ttgtc.com/forum/showthread.php?t=11
-Bây giờ trên PC ta truy cập vào Web https://172.16.2.1 để login vào giao diện Web của Router. Ta nhập username và password của bước 2 để chứng thực,sau khi chứng thực thành công ta được giao diện của SDM như sau :
-Vào Edit > Preferences chọn Preview commands before delivering to router
để có thể xem trước lệnh SDM sắp chuỷên xuống router để cấu hình
-Làm theo các bước sau để cấu hình EZVPN router trở thành VPN server
Chọn Configure > VPN > Easy VPN Server >Launch Easy VPN Server Wizard.
AAA phải được enable trên VPN server, AAA là viết tắt của Authentication (xác thực ), Accounting (cấp quyền ), Accounting ( tính cước, log) . Chọn Yes để tiếp tục
Chọn Next tại Easy VPN Server Wizard.
Chọn interface mà Cisco VPN client sẽ kết nối VPN server,trong trường hợp này là S0/1/0
Chọn Next để cấu hình Internet Key Exchange (IKE) Policy ,có thể chọn Add để tạo Policy mới
Click Next để chọn transform set mặc định, hoặc tạo transform set mới . Trong trường hợp này chúng ta chọn transform set mặc định
Tại Chọn Local tại Group Authorization and Group Policy Lookup
Chon Local tại User Authentication
Add User Credenticals > thêm user có tên là vpnuser có mật khẩu la vpnuser với privileage là 1 để chứng thực khi client vpn vào router
Nhấn Next
Nhấn Add để nhập mới 1 Tunnel Group tên là vpn với pre-share key là 123456 và pool ip thuộc lớp mạng của PCVPN từ 172.16.2.240 đến 172.16.2.250
SDM sẽ báo trùng lớp mạng với PCVPN > OK
Ta có thể xem lại toàn bộ cấu hình tại đây > Finish
Sau đó SDM sẽ đẩy lệnh xuống router
4.Cài đặt phần mềm Cisco VPN
Kiểm tra địa chỉ IP trên máy VPN client
Sau đó từ máy client thử ping đến VPN server
Cài đặt phần mềm Cisco VPN client và tạo kết nối đến VPN server bằng cách chọn Connection Entries > New
Nhập thông tin về như sau :
Chọn kết nối VPN vừa mới khởi tạo chọn Connect
EZVPN server sẻ yêu cầu chứng thực ta sử dụng vpnuser và mật khẩu là vpnuser đã tạo ở bước 1 để chứng thực :
Sauk khi chứng thực thành công vpn client sẽ được cấp phát 1 địa chỉ ip nằm trong khoảng từ 172.16.2.240 – 172.16.2.250 mà ta đã cấu hình ở trên
Từ vpn client thử ping đến các mạng LAN ở DN và HCM
Kiểm tra lại bảng định tuyến trên EZVPN server ta sẽ thấy có 1 route tĩnh được tự động thêm vào bảng định tuyến
EZVPN#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.16.6.2 to network 0.0.0.0
172.16.0.0/16 is variably subnetted, 7 subnets, 2 masks
S 172.16.2.240/32 [1/0] via 172.16.7.2
C 172.16.4.0/24 is directly connected, Serial0/2/1
C 172.16.5.0/24 is directly connected, Serial0/1/1
C 172.16.6.0/24 is directly connected, Serial0/1/0
O 172.16.1.0/24 [110/782] via 172.16.4.2, 00:31:23, Serial0/2/1
C 172.16.2.0/24 is directly connected, FastEthernet0/1
O 172.16.3.0/24 [110/782] via 172.16.5.2, 00:31:23, Serial0/1/1
S* 0.0.0.0/0 [1/0] via 172.16.6.2
Như chúng ta thấy ,EZVPN sẽ tự động tạo ra 1 static route đến 172.16.2.240 ,ip của vpn client ,giúp cho vpn cleint có thể truy cập đến tài nguyên của các mạng LAN bên trong router ĐN,HCM
Cấu hình VPN Site to site trên Packet Tracer
Mô hình :
Mô hình :
Mô hình :
Yêu cầu : Cấu hình VPN site to site để 2 mạng liên lạc được với nhau
Cấu hình :
a. Cấu hình ban đầu
- Router ISP :
hostname ISP
!
interface Serial0/0/0
ip address 203.162.1.2 255.255.255.0
no shut
clock rate 64000
!
interface Serial0/0/1
ip address 203.162.2.2 255.255.255.0
no shut
clock rate 64000
- Router TTG1 :
hostname TTG1
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
no shut
|
interface Serial0/0/0
ip address 203.162.1.1 255.255.255.0
no shut
!
ip route 0.0.0.0 0.0.0.0 203.162.1.2 //cấu hình default route để đi ra Internet
- Router TTG2 :
hostname TTG2
!
interface FastEthernet0/0
ip address 192.168.2.1 255.255.255.0
no shut
!
interface Serial0/0/0
ip address 203.162.2.1 255.255.255.0
no shut
!
ip route 0.0.0.0 0.0.0.0 203.162.2.2 //cấu hình default route để đi ra Internet
B. Cấu hình VPN Server TTG1 và TTG2
- Router TTG1 :
Bước1: Tạo Internet Key Exchange (IKE) key policy.
TTG1#config t
Enter configuration commands, one per line. End with CNTL/Z.
TTG1(config)#crypto isakmp policy 10
TTG1(config-isakmp)#hash md5
TTG1(config-isakmp)#authentication pre-share
TTG1(config-isakmp)#exit
Bước 2: Tạo shared key và life time để sử dụng cho kết nối VPN
TTG1(config)#crypto isakmp key KEY_TTG address 203.162.2.1
TTG1(config)#crypto ipsec security-association lifetime seconds 86400
Bước 3 : Tạo ACL chỉ định mạng được thiết lập kết nối VPN
TTG1(config)#access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
Bước 4: định nghĩa thiết lập transformations sử dụng cho kết nối VPN
TTG1#config t
Enter configuration commands, one per line. End with CNTL/Z.
TTG1(config)#crypto ipsec transform-set TRAN_TTG esp-3des esp-md5-hmac
Bước 5: Tạo cypto-map cho các transform, setname
TTG1(config)#crypto map MAP_TTG 10 ipsec-isakmp
% NOTE: This new crypto map will remain disabled until a peer
and a valid access list have been configured.
TTG1(config-crypto-map)#set peer 203.162.2.1 (IP của TTG2)
TTG1(config-crypto-map)#set transform-set TRAN_TTG (setname ở Bước 4)
TTG1(config-crypto-map)#match address 101 (ACL tạo ở Bước 3)
TTG1(config-crypto-map)#exit
Bước 7 : Gán vào Interface
TTG1(config)#interface s0/0/0
TTG1(config-if)#crypto map MAP_TTG
*Jan 3 07:16:26.785: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
TTG1(config-if)#
- Router TTG2 :
TTG2#config t
Enter configuration commands, one per line. End with CNTL/Z.
TTG2(config)#crypto isakmp policy 10
TTG2(config-isakmp)#hash md5
TTG2(config-isakmp)#authentication pre-share
TTG2(config-isakmp)#exit
TTG2(config)#crypto isakmp key KEY_TTG address 203.162.1.1
TTG2(config)#crypto ipsec security-association lifetime seconds 86400
TTG2(config)#access-list 101 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255
TTG2(config)#crypto ipsec transform-set TRAN_TTG esp-3des esp-md5-hmac
TTG2(config)#crypto map MAP_TTG 10 ipsec-isakmp
% NOTE: This new crypto map will remain disabled until a peer
and a valid access list have been configured.
TTG2(config-crypto-map)#set peer 203.162.1.1
TTG2(config-crypto-map)#set transform-set TRAN_TTG
TTG2(config-crypto-map)#match address 101
TTG2(config-crypto-map)#exit
TTG2(config)#interface s0/0/0
TTG2(config-if)#crypto map MAP_TTG
*Jan 3 07:16:26.785: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
TTG2(config-if)#
Kiểm tra :
Code:
TTG1#show crypto isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id slot status
203.162.2.1 203.162.1.1 QM_IDLE 1078 0 ACTIVE
IPv6 Crypto ISAKMP SA
Code:
TTG1#show crypto ipsec sa
interface: Serial0/0/0
Crypto map tag: MAP_TTG, local addr 203.162.1.1
protected vrf: (none)
local ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0)
remote ident (addr/mask/prot/port): (192.168.2.0/255.255.255.0/0/0)
current_peer 203.162.2.1 port 500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 7, #pkts encrypt: 7, #pkts digest: 0
#pkts decaps: 7, #pkts decrypt: 7, #pkts verify: 0
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 1, #recv errors 0
Code:
TTG1#show crypto map
Crypto Map MAP_TTG 10 ipsec-isakmp
Peer = 203.162.2.1
Extended IP access list 101
access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
Current peer: 203.162.2.1
Security association lifetime: 4608000 kilobytes/86400 seconds
PFS (Y/N): N
Transform sets={
TRAN_TTG,
}
Interfaces using crypto map MAP_TTG:
Serial0/0/0
TTG1#
Kiểm tra ping từ PC1 đến PC4 :
Cisco VPN sử dụng PPTP
1.Giới thiệu :
Nếu hệ thống của bạn đang sử dụng router Cisco và muốn cung cấp các kết nối từ xa cho các user đang công tác ở bên ngoài mà không cần tốn thêm một VPN server riêng, ta có thể cấu hình cho Cisco IOS router trở thành VPN Server sử dụng PPTP. Ưu điểm của loại VPN server này là các user bên ngaoif không cần phải cài phần mềm Cisco VPN client mà user dùng luôn Microsoft VPN client nếu công ty sử dụng hệ điều hành Window
-Để cấu hình được Cisco IOS router trở thành VPN server thì đòi hỏi IOS phải hỗ trợ thuật toán 3DES,DES (thông thường có k8 hay k9 ở phần tên )
2.Mô hình bài Lab
Nếu hệ thống của bạn đang sử dụng router Cisco và muốn cung cấp các kết nối từ xa cho các user đang công tác ở bên ngoài mà không cần tốn thêm một VPN server riêng, ta có thể cấu hình cho Cisco IOS router trở thành VPN Server sử dụng PPTP. Ưu điểm của loại VPN server này là các user bên ngaoif không cần phải cài phần mềm Cisco VPN client mà user dùng luôn Microsoft VPN client nếu công ty sử dụng hệ điều hành Window
-Để cấu hình được Cisco IOS router trở thành VPN server thì đòi hỏi IOS phải hỗ trợ thuật toán 3DES,DES (thông thường có k8 hay k9 ở phần tên )
2.Mô hình bài Lab
-Trong bài Lab sử dụng 1 router 3750 có IOS hổ trợ cấu hình Microsoft PPTP VPN server
-Bắt đầu tiến hành cấu hình :
Bước 1 : Bật dịch vụ VPDN (virtual private dial-up networking), được sử dụng bởi các VPN client để thiết lập kết nối
-Bắt đầu tiến hành cấu hình :
Bước 1 : Bật dịch vụ VPDN (virtual private dial-up networking), được sử dụng bởi các VPN client để thiết lập kết nối
Code:
Router(config)# vpdn enable
Bước 2 : Tạo một nhóm VPDN tên là TEST-VPN
Code:
Router(config)# vpdn-group TEST-VPN
Router(config-vpdn)# accept-dialin
Router(config-vpdn)# protocol pptp
Router(config-vpdn)# virtual-template 1
Router(config-vpdn)# exit
Bước 3: Cấu hình địa chỉ IP
Code:
Router(config)# interface fa0/0
Router(config-if)# ipaddress 192.168.30.1 255.255.255.0
Router(config-if)# noshutdown
Router(config)# interface fa0/1
Router(config-if)# ipaddress 10.10.10.1 255.255.255.0
Router(config-if)# no shutdown
Bước 4: Tiếp theo ta tạo ra một interface Virtual-Template áp dụng cho kết nối VPN từ bên ngoài vào, sử dụng Ip của interface fa0/1 và tham chiếu đến một dãy địa chỉ ip sẽ được cấp cho các VPN client, cuối cùng là cấu hình chuẩn mã hóa MPPE và chứng thực bằng MS-CHAP,MS-CHAPv2 mặc định của Microsoft VPN client
Code:
Router(config)# interface Virtual-Template1
Router(config-if)# ip unnumbered fa0/1
Router(config-if)# peer default ip address pool defaultpool
Router(config-if)# ppp encrypt mppe auto required
Router(config-if)# ppp authentication ms-chap ms-chap-v2
-Sử dụng lệnh ip local pool để cấu hình dãi ip cấp phát cho VPN client,trong trường hợp này ta sẽ cấp phát các ip từ 10.10.10.250 đến 10.10.10.254 thuộc lớp mạng của internal server
Code:
Router(config)# ip local pool defaultpool 10.10.10.250 10.10.10.254
-Tạo ra user để chứng thực cho VPN client
Code:
Router(config)# username test password test
-Cấu hình chứng thực cho PPP bằng cách sử dụng các user tạo ra cục bộ trên router hoặc nếu có RADIUS server thì có thể cấu hình cho router trỏ đến RADIUS để chứng thực
Code:
Router(config)# aaanew-model
Router(config)# aaaauthentication ppp default local
Bước 5 : Cấu hình trên máy Window client
-Vào Start | Control Panel | NetworkConnections. Click on New Connection Wizard
-Vào Start | Control Panel | NetworkConnections. Click on New Connection Wizard
-Chọn VirtualPrivate Network Connection
-Đặt tên cho kết nối VPN
-Nhập tiếp ip của VPN server trong trường hợp này là 192.168.30.1
-Ta sẽ thấy giao diện kết nối như bên dưới ,nhập username là test mật khẩu là test đã tạo ở trên
-Nhấn Connect để kết nối đến VPN server, sau khi kết nối thành công đến VPN server sẽ được cấp phát một ip trong pool đã cấu hình
-Kiểm tra lại bảng định tuyến trên router sẽ thấy 1 route mới tao ra cho VPN client
-Cuối cùng kiểm lại kết nối từ VPN client đến các máy bên trong mạng LAN
Bai viet duoc tham khao tai: http://ttgtc.com/forum/
Đăng ký:
Bài đăng (Atom)