2014. 11. 20. 16:40
   |   
Study/Cisco

PC1, 2 // Sw1 |
! interface FastEthernet0/1 ip address 10.1.4.2 255.255.255.128 duplex auto speed auto ! ip http server ip classless ip route 0.0.0.0 0.0.0.0 10.1.4.1 ! |
|
! interface FastEthernet0/1 ip address 10.1.4.130 255.255.255.128 duplex auto speed auto ! ip http server ip classless ip route 0.0.0.0 0.0.0.0 10.1.4.129 ! |
|
!
interface FastEthernet0/1
switchport mode access
switchport access vlan 10
!
interface FastEthernet0/2
switchport mode access
switchport access vlan 20
!
interface FastEthernet0/3
switchport mode trunk
! |
R1 |
! interface FastEthernet0/0.10 encapsulation dot1Q 10 ip address 10.1.4.1 255.255.255.128 ip nat inside ! interface FastEthernet0/0.20 encapsulation dot1Q 20 ip address 10.1.4.129 255.255.255.128 ip nat inside ! interface Serial0/0/0 ip address 10.1.12.1 255.255.255.252 ip nat outside clock rate 2000000 ! ip nat pool A 100.100.99.1 100.100.99.6 netmask 255.255.255.248 ip nat pool B 100.100.99.9 100.100.99.14 netmask 255.255.255.248 ip nat inside source list 1 pool A ip nat inside source list 2 pool B ip classless ip route 0.0.0.0 0.0.0.0 10.1.12.2 ! ! access-list 1 permit 10.1.4.0 0.0.0.127 access-list 2 permit 10.1.4.128 0.0.0.127
! |
Router>sh ip nat translations Pro Inside global Inside local Outside local Outside global --- 100.100.99.3 10.1.4.2 --- --- --- 100.100.99.11 10.1.4.130 --- ---
Router>sh ip route 100.0.0.0/30 is subnetted, 1 subnets S 100.100.99.0 [1/0] via 10.1.12.2 10.0.0.0/30 is subnetted, 3 subnets C 10.1.12.0 is directly connected, Serial0/1 C 10.1.4.0 is directly connected, Ethernet0/1.10 C 10.1.4.128 is directly connected, Ethernet0/1.20 |
R2 |
! interface Serial0/0/0 ip address 10.1.12.2 255.255.255.252 ! ip classless ip route 100.100.99.0 255.255.255.128 10.1.12.1 ip route 100.100.99.8 255.255.255.248 10.1.12.1 ! |
|