nat-dhcp
SW2960:
interface FastEthernet0/4 switchport access vlan 30 SW2960#show run
!
Building configuration... interface FastEthernet0/5
switchport access vlan 40 Current configuration : 1140 bytes !
!
interface FastEthernet0/6 version 12.2
!
no service timestamps log datetime msec ………
no service timestamps debug datetime msec interface FastEthernet0/24 no service password-encryption !
!
interface GigabitEthernet1/1 hostname SW2960 !
!
interface GigabitEthernet1/2 interface FastEthernet0/1 !
switchport mode trunk interface Vlan1 !
no ip address interface FastEthernet0/2 shutdown switchport access vlan 10 !
!
line con 0 interface FastEthernet0/3 !
switchport access vlan 20 line vty 0 4 !
login
line vty 5 15 login ! end
SW2960#
SW3560:
SW3560#show run
Building configuration...
Current configuration : 1894 bytes !
version 12.2
no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption !
hostname SW3560 !
ip dhcp excluded-address 192.168.20.1 192.168.20.10
ip dhcp excluded-address 192.168.20.12 192.168.20.20
ip dhcp excluded-address 192.168.30.1 !
ip dhcp pool vlan20
network 192.168.20.0 255.255.255.0 default-router 192.168.20.1 ip dhcp pool vlan30
network 192.168.30.0 255.255.255.0 default-router 192.168.30.1 ip routing !
interface FastEthernet0/1 no switchport
ip address 100.100.100.2 255.255.255.0 duplex auto speed auto !
interface FastEthernet0/2
switchport trunk encapsulation dot1q switchport mode trunk !
interface FastEthernet0/3
switchport access vlan 100 switchport mode access !
interface FastEthernet0/4 !
………
interface FastEthernet0/24 !
interface GigabitEthernet0/1 !
interface GigabitEthernet0/2 !
interface Vlan1 no ip address shutdown !
interface Vlan10
ip address 192.168.10.1 255.255.255.0 !
interface Vlan20
ip address 192.168.20.1 255.255.255.0 !
interface Vlan30
ip address 192.168.30.1 255.255.255.0 !
interface Vlan40
ip address 192.168.40.1 255.255.255.0 !
interface Vlan100
ip address 192.168.100.1 255.255.255.0 !
ip classless
ip route 0.0.0.0 0.0.0.0 100.100.100.1 !
line con 0 line vty 0 4 login ! end
SW3560#
R0:
LanToWan#show run Building configuration...
Current configuration : 785 bytes !
version 12.4
no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption !
hostname LanToWan !
interface FastEthernet0/0
ip address 61.178.69.2 255.255.255.0 ip nat outside duplex auto speed auto !
interface FastEthernet0/1
ip address 100.100.100.1 255.255.255.0 ip nat inside duplex auto speed auto !
interface Vlan1 no ip address shutdown !
ip nat inside source list 1 interface FastEthernet0/0 overload
ip nat inside source static tcp 192.168.100.254 80 61.178.69.2 80 ip classless ip route 192.168.0.0 255.255.0.0 100.100.100.2
ip route 0.0.0.0 0.0.0.0 61.178.69.1 !
access-list 1 permit 192.168.0.0 0.0.255.255 !
no cdp run !
line con 0 line vty 0 4 login ! end
LanToWan#
R1:
R-m#show run
Building configuration...
Current configuration : 595 bytes !
version 12.4
no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption !
hostname R-m !
interface FastEthernet0/0
ip address 61.178.69.1 255.255.255.0 duplex auto speed auto !
interface FastEthernet0/1 ip address 10.0.0.2 255.0.0.0 duplex auto speed auto !
interface Vlan1 no ip address shutdown !
router ospf 1
log-adjacency-changes
network 10.0.0.0 0.255.255.255 area 0 network 61.178.69.0 0.0.0.255 area 0 !
ip classless !
no cdp run !
line con 0 line vty 0 4 login ! end R-m#
R2:
R-s#show run
Building configuration...
Current configuration : 587 bytes !
version 12.4
no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption !
hostname R-s !
interface FastEthernet0/0 ip address 1.1.1.1 255.0.0.0 duplex auto speed auto !
interface FastEthernet0/1 ip address 10.0.0.1 255.0.0.0 duplex auto speed auto !
interface Vlan1 no ip address shutdown !
router ospf 1
log-adjacency-changes
network 1.0.0.0 0.255.255.255 area 0 network 10.0.0.0 0.255.255.255 area 0 !
ip classless !
no cdp run !
line con 0 line vty 0 4 login ! end R-s#
因篇幅问题不能全部显示,请点此查看更多更全内容