码迷,mamicode.com
首页 > 其他好文 > 详细

单臂路由配置+DHCP中继+OSPF实施

时间:2017-07-04 01:04:20      阅读:290      评论:0      收藏:0      [点我收藏+]

标签:oda   sub   dwz   gif   ddr   2pc   bgp   abd   com   

                                                                                              技术分享

需求:将R1和R2分别分入vlan10 和vlan20, 并且两个vlan内的主机都使用DHCP动态地f分别从1.1.1.0和1.1.2.0网段获得IP地址,由R4作为DHCP服务器实现DHCP中继,并保留1.1.1.250-254和1.1.2.250-254

 

实施-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

R1:

R1<config># int e0/0

R1<config-if># ip address dhcp

R1<config-if># no shutdown

 

 

 

R2:

R2<config># int e0/0

R2<config-if># ip address dhcp

R2<config-if># no shutdown

 

 

 

SW1:

SW1<config># vlan 10,20

SW1<config># int e0/0

SW1<config-if># switchport mode access

SW1<config-if># switchport access vlan 10

SW1<config># int e0/1

SW1<config-if># switchport mode access

SW1<config-if># switchport access vlan 20

SW1<config-if># exit

SW1<config># int e0/2

SW1<config-if># switchport trunk encapsulation dot1q

SW1<config-if># switchport mode trunk

SW1<config-if># switchport trunk allowed vlan 10,20

 

 

 

R3:

R3<config># int e0/0

R3<config-if># no shutdown

R3<config-if># int e0/0.10

R3<config-subif># no shutdown

R3<config-subif># ip address 1.1.1.254 255.255.255.0

R3<config-subif># ip helper-address 192.168.1.1

R3<config-if># int e0/0.20

R3<config-subif># no shutdown

R3<config-subif># ip address 1.1.2.254 255.255.255.0

R3<config-subif># ip helper-addess 192.168.1.1

R3<config-if># int e0/1

R3<config-subif># no shutdown

R3<config-subif># ip address 192.168.1.2 255.255.255.0

R3<config-subif># exit

R3<config># router ospf 100

R3<config-router># router-id 0.0.0.1

R3<config-router># network 1.1.1.0 255.255.255.0

R3<config-router># network 1.1.2.0 255.255.255.0

 

 

 

R4:

R4<config># int e0/0

R4<config-if># ip address 192.168.1.1 255.255.255.0

R4<config-if># no shutdown

R4<config-if># exit

R4<config># ip dhcp excluded-address 1.1.1.250 1.1.1.254

R4<config># ip dhcp excluded-address 1.1.2.250 1.1.2.254

R4<config># ip dhcp pool vlan10

R4<dhcp-config># network 1.1.1.0 255.255.255.0

R4<dhcp-config># default-router 1.1.1.254 (255.255.255.0)

R4<dhcp-config># dns-server 114.114.114.114 8.8.8.8

R4<dhcp-config># domain-name wuguan.com

R4<config># ip dhcp pool vlan20

R4<dhcp-config># network 1.1.2.0 255.255.255.0

R4<dhcp-config># default-router 1.1.2.254 (255.255.255.0)

R4<dhcp-config># dns-server 114.114.114.114 8.8.8.8

R4<dhcp-config># domain-name wuguan.com

R4<dhcp-config># exit

R4<config># router ospf 100

R4<config-router># router-id 0.0.0.2

R4<config-router># network 192.168.1.1 255.255.255.0

 

配置结束---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

单臂路由配置+DHCP中继+OSPF实施

标签:oda   sub   dwz   gif   ddr   2pc   bgp   abd   com   

原文地址:http://www.cnblogs.com/wuguan/p/7113639.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!