Network Configuration: DHCP, NAT, OSPF, and Frame Relay
HCP
Configuration
en
conf t
host DHCP
int f0/0
ip add 172.16.10.1 255.255.255.240
ip ospf priority 0
no shutdown
exit
DHCP Excluded Addresses
ip dhcp excluded-address 10.10.10.1
ip dhcp excluded-address 20.20.20.1
ip dhcp excluded-address 30.30.30.1
ip dhcp excluded-address 40.40.40.1
ip dhcp excluded-address 50.50.50.1
ip dhcp excluded-address 60.60.60.1
DHCP Pools
VLAN 10
ip dhcp pool VLAN10
network 10.10.10.0 255.255.255.0
default-router 10.10.10.1
dns-server 10.0.0.8
exit
VLAN 20
ip dhcp pool VLAN20
network 20.20.20.0 255.255.255.0
default-router 20.20.20.1
dns-server 10.0.0.8
exit
VLAN 30
ip dhcp pool VLAN30
network 30.30.30.0 255.255.255.0
default-router 30.30.30.1
dns-server 10.0.0.8
exit
VLAN 40
ip dhcp pool VLAN40
network 40.40.40.0 255.255.255.0
default-router 40.40.40.1
dns-server 10.0.0.8
exit
VLAN 50
ip dhcp pool VLAN50
network 50.50.50.0 255.255.255.0
default-router 50.50.50.1
dns-server 10.0.0.8
exit
VLAN 60
ip dhcp pool VLAN60
network 60.60.60.0 255.255.255.0
default-router 60.60.60.1
dns-server 10.0.0.8
exit
OSPF Configuration
router ospf 1
router-id 3.3.3.3
network 172.16.10.0 0.0.0.15 area 0
exit
ISP1
Configuration
en
conf t
host ISP1
int f0/0
ip add 172.16.10.2 255.255.255.240
ip ospf priority 255
no shutdown
exit
int s0/0/0
encapsulation frame-relay
no shutdown
exit
int s0/0/0.1 multipoint
ip add 100.0.0.2 255.255.255.240
frame-relay map ip 100.0.0.1 203 broadcast
frame-relay map ip 100.0.0.3 201 broadcast
ip ospf network broadcast
exit
OSPF Configuration
router ospf 1
router-id 1.1.1.1
network 172.16.10.0 0.0.0.15 area 0
network 100.0.0.0 0.0.0.15 area 0
exit
RT1
Configuration
en
conf t
host RT1
int s0/0/0
encapsulation frame-relay
no shutdown
exit
int s0/0/0.1 multipoint
ip add 100.0.0.3 255.255.255.240
frame-relay map ip 100.0.0.2 102 broadcast
frame-relay map ip 100.0.0.1 103 broadcast
ip ospf network broadcast
ip nat outside
exit
VLAN Interfaces
VLAN 10
int f0/0.10
encapsulation dot1q 10
ip add 10.10.10.1 255.255.255.0
ip nat inside
ip helper-address 172.16.10.1
exit
VLAN 20
int f0/0.20
encapsulation dot1q 20
ip add 20.20.20.1 255.255.255.0
ip nat inside
ip helper-address 172.16.10.1
exit
VLAN 30
int f0/0.30
encapsulation dot1q 30
ip add 30.30.30.1 255.255.255.0
ip nat inside
ip helper-address 172.16.10.1
exit
int f0/0
no shutdown
exit
NAT Configuration
access-list 1 permit 10.10.10.0 0.0.0.255
access-list 2 permit 20.20.20.0 0.0.0.255
access-list 3 permit 30.30.30.0 0.0.0.255
ip nat inside source list 1 interface s0/0/0.1 overload
ip nat inside source list 2 interface s0/0/0.1 overload
ip nat inside source list 3 interface s0/0/0.1 overload
OSPF Configuration
router ospf 1
network 100.0.0.0 0.0.0.15 area 0
network 10.10.10.0 0.0.0.255 area 0
network 20.20.20.0 0.0.0.255 area 0
network 30.30.30.0 0.0.0.255 area 0
exit
ISP3
Configuration
en
conf t
host ISP3
user RT2 password blahblah
int s0/0/0
encapsulation frame-relay
no shutdown
exit
int s0/0/0.1 multipoint
ip add 100.0.0.1 255.255.255.240
frame-relay map ip 100.0.0.2 302 broadcast
frame-relay map ip 100.0.0.3 301 broadcast
ip ospf network broadcast
exit
int s0/0/1
encapsulation ppp
ppp authentication chap
clock rate 64000
ip add 192.168.200.1 255.255.255.252
no shutdown
exit
OSPF Configuration
router ospf 1
network 100.0.0.0 0.0.0.15 area 0
default-information originate
exit
ip route 0.0.0.0 0.0.0.0 s0/0/1
RT2
Configuration
en
conf t
host RT2
user ISP3 password blahblah
int s0/0/1
encapsulation ppp
ppp authentication chap
ip add 192.168.200.2 255.255.255.252
ip nat outside
no shutdown
exit
VLAN Interfaces
VLAN 40
int f0/0.40
encapsulation dot1q 40
ip add 40.40.40.1 255.255.255.0
ip nat inside
ip helper-address 172.16.10.1
exit
VLAN 50
int f0/0.50
encapsulation dot1q 50
ip add 50.50.50.1 255.255.255.0
ip nat inside
ip helper-address 172.16.10.1
exit
VLAN 60
int f0/0.60
encapsulation dot1q 60
ip add 60.60.60.1 255.255.255.0
ip nat inside
ip helper-address 172.16.10.1
exit
int f0/0
no shutdown
exit
ip route 0.0.0.0 0.0.0.0 s0/0/1
NAT Configuration
access-list 10 permit 40.40.40.0 0.0.0.255
access-list 11 permit 50.50.50.0 0.0.0.255
access-list 12 permit 60.60.60.0 0.0.0.255
ip nat pool POOL-VL40 222.222.0.1 222.222.0.2 netmask 255.255.255.248
ip nat pool POOL-VL50 222.222.0.3 222.222.0.4 netmask 255.255.255.248
ip nat pool POOL-VL60 222.222.0.5 222.222.0.6 netmask 255.255.255.248
ip nat inside source list 10 pool POOL-VL40 overload
ip nat inside source list 11 pool POOL-VL50 overload
ip nat inside source list 12 pool POOL-VL60 overload
ISP2
Configuration
en
conf t
host ISP2
int f0/0
ip add 172.16.10.3 255.255.255.240
ip ospf priority 254
no shutdown
exit
int s0/0/0
encapsulation frame-relay ietf
frame-relay lmi-type ansi
no shutdown
exit
int s0/0/0.1 point-to-point
ip add 200.0.0.1 255.255.255.252
frame-relay interface-dlci 100
exit
OSPF Configuration
router ospf 1
router-id 2.2.2.2
network 172.16.10.0 0.0.0.15 area 0
network 200.0.0.0 0.0.0.3 area 0
exit
SERV
Configuration
en
conf t
host SERV
int s0/0/0
encapsulation frame-relay ietf
frame-relay lmi-type ansi
no shutdown
exit
int s0/0/0.1 point-to-point
ip add 200.0.0.2 255.255.255.252
frame-relay interface-dlci 200
exit
int f0/0
ip add 10.0.0.1 255.255.255.240
no shutdown
exit
OSPF Configuration
router ospf 1
network 200.0.0.0 0.0.0.3 area 0
network 10.0.0.0 0.0.0.15 area 0
passive-interface f0/0
exit
NAT Configuration
ip nat inside source static tcp 10.0.0.4 80 200.0.0.2 80
ip nat inside source static tcp 10.0.0.6 80 200.0.0.2 8080
ip nat inside source static tcp 10.0.0.10 21 200.0.0.2 21
ip nat inside source static udp 10.0.0.8 53 200.0.0.2 53
S1
Configuration
en
conf t
host S1
vlan 10
vlan 20
vlan 30
exit
int f0/24
switchport mode trunk
exit
VLAN Interfaces
VLAN 10
int range f0/1-5
switchport mode access
switchport access vlan 10
exit
VLAN 20
int range f0/6-10
switchport mode access
switchport access vlan 20
exit
VLAN 30
int range f0/11-15
switchport mode access
switchport access vlan 30
exit
S2
Configuration
en
conf t
host S2
vlan 40
vlan 50
vlan 60
exit
int f0/24
switchport mode trunk
exit
VLAN Interfaces
VLAN 40
int range f0/1-5
switchport mode access
switchport access vlan 40
exit
VLAN 50
int range f0/6-10
switchport mode access
switchport access vlan 50
exit
VLAN 60
int range f0/11-15
switchport mode access
switchport access vlan 60
exit