DHCP中繼和單臂路由實驗配置

wKiom1O9CLHiP0hJAAEGY8IIWP8098.jpg

R7 r8 r10端口動態獲取ip  dom

router(config)#interfacef0/0ide

Router(config-if)#ip address dhcpspa

R6劃分VLAN 打上trunkrouter

R5配置server

Router(config)#interface f0/0xml

Router(config-if)#no shutdownblog

Router(config-subif)#interface f0/0.2dns

Router(config-subif)#no shutdown圖片

Router(config-subif)#encapsulation dot1q 2ip

Router(config-subif)#ip address 192.168.20.1 255.255.255.0

Router(config-subif)#interface f0/0.3

Router(config-subif)#encapsulation dot1q 3

Router(config-subif)#ip address 192.168.30.1 255.255.255.0

Router(config)#service dhcp

Router(config)#ip dhcp excluded-address 192.168.20.1 192.168.20.10

Router(config)#ip dhcp excluded-address 192.168.30.1 192.168.30.10

Router(config)#ip dhcp excluded-address 192.168.40.1 192.168.40.10

Router(config)#ip dhcp pool yang

Router(dhcp-config)#network 192.168.0.0 255.255.0.0

Router(dhcp-config)#dns-server 5.5.5.5

Router(dhcp-config)#domain-name yang.com

Router(dhcp-config)#lease 2

Router(dhcp-config)#ip dhcp pool vlan2

Router(dhcp-config)#network 192.168.20.0 255.255.255.0

Router(dhcp-config)#lease 1

Router(dhcp-config)#default-router 192.168.20.1

Router(dhcp-config)#ip dhcp pool vlan3

Router(dhcp-config)#network 192.168.30.0 255.255.255.0

Router(dhcp-config)#default-router 192.168.30.1

Router(dhcp-config)#lease 1

Router(dhcp-config)#ip dhcp pool vlan4

Router(dhcp-config)#network 192.168.40.0 255.255.255.0

Router(dhcp-config)#default-router 192.168.40.1

Router(dhcp-config)#lease 1

R9配置

Router(config)#service dhcp

Router(config)#interface f0/0

Router(config-if)#no sh

Router(config-if)#ip address 192.168.40.1 255.255.255.0

Router(config-if)#ip helper-address 1.1.1.1

 

R5R9封裝路由協議;

相關文章
相關標籤/搜索