CCNA--LAB-11:装备单臂路由(企业经典事例)51CTO博客 - 威尼斯人

CCNA--LAB-11:装备单臂路由(企业经典事例)51CTO博客

2019年02月23日13时10分52秒 | 作者: 寄文 | 标签: 路由,单臂,形式 | 浏览: 2764

什么是单臂路由: 为什么要用到单臂路由。VLAN(虚拟局域网)技能是路由交流中十分根底的技能。在网络办理实践中,经过在交流机上区分恰当数意图vlan,不只能有用阻隔播送风暴,还能进步网络安全系数及网络带宽的运用功率。区分vlan之后,vlan与vlan之间是不能通讯的, 要想使不同VLAN里的主机互访就得运用VLAN间路由技能。在考虑本钱的情况下咱们一般挑选单臂路由,单臂路由需求一台交流机和一台路由器来一起完成。     拓扑如下:   试验意图:接口信息以及IP地址规划如拓扑所示,PC1——PC3别离归于VLAN1——VLAN3, 运用单臂路由与NAT的结合,终究使得用户之间可以相互拜访,使企业内部悉数可以拜访因特网。     详细装备:   R1:
 
Router>
Router>en
Router#conf t
Router(config)#hostname R1
R1(config)#interface f0/0
R1(config-if)#no sh     首先把物理接口激活,其它子接口就不必再激活
R1(config)#interface f0/0.1    进入子接口形式
R1(config-subif)#encapsulation dot1Q 1     对VLAN1进行封装DOT1Q
R1(config-subif)#ip address 192.168.1.254 255.255.255.0
R1(config-subif)#exit
R1(config)#interface f0/0.2     进入子接口形式
R1(config-subif)#encapsulation dot1Q 2     对VLAN2进行封装DOT1Q
R1(config-subif)#ip address 192.168.2.254 255.255.255.0
R1(config-subif)#exit
R1(config)#interface f0/0.3     进入子接口形式
R1(config-subif)#encapsulation dot1Q 3     对VLAN3进行封装DOT1Q
R1(config-subif)#ip address 192.168.3.254 255.255.255.0
R1(config-subif)#exit
R1(config)#interface f0/1
R1(config-if)#ip address 218.87.18.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#access-list 1 permit 192.168.1.0 0.0.0.255     界说答应的流量
R1(config)#access-list 1 permit 192.168.2.0 0.0.0.255
R1(config)#access-list 1 permit 192.168.3.0 0.0.0.255
R1(config)#ip nat inside source list 1 interface f0/1 overload
界说契合拜访操控列表1的流量向F0/1口转发
R1(config)#interface f0/0.1
R1(config-subif)#ip nat inside   界说内部接口
R1(config-subif)#interface f0/0.2
R1(config-subif)#ip nat inside
R1(config-subif)#interface f0/0.3
R1(config-subif)#ip nat inside
R1(config-subif)#exit
R1(config-if)#interface f0/1
R1(config-if)#ip nat outside    界说外部接口
R1(config-if)#exit
R1(config)#ip route 0.0.0.0 0.0.0.0 218.87.18.2    默许路由指向ISP
R1(config-if)#end
R1#
 
 
 
 
SW1:
 
Switch>
Switch>en
Switch#conf t
Switch(config)#hostname SW1
SW1(config)#vlan 2     创立VLAN2
SW1(config-vlan)#exit
SW1(config)#vlan 3     创立VLAN3
SW1(config-vlan)#exit
SW1(config)#interface f0/2
SW1(config-if)#switchport mode access     端口形式为ACCESS
SW1(config-if)#switchport access vlan 2    把当时端口加入到VLAN2
SW1(config-if)#no sh
SW1(config-if)#exit
SW1(config)#interface f0/3
SW1(config-if)#switchport mode access     端口形式为ACCESS
SW1(config-if)#switchport access vlan 3    把当时端口加入到VLAN3
SW1(config-if)#exit
SW1(config)#interface f0/24
SW1(config)#switchport trunk encapsulation dot1q    把接口封装为DOT1Q
SW1(config-if)#switchport mode trunk      接口形式为TRUNK(中继)
SW1(config-if)#no sh
SW1(config-if)#end
SW1#
 
 
ISP:
 
Router>
Router>en
Router#conf t
Router(config)#hostname ISP
ISP(config)#interface f0/1
ISP(config-if)#ip address 218.87.18.2 255.255.255.0
ISP(config-if)#no sh
ISP(config-if)#end
ISP#
 
 
 
3台PC上别离做验证:
 
PC1:
 
PC>ipconfig
 
IP Address......................: 192.168.1.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.254
 
 
PC>ping 218.87.18.2
 
Pinging 218.87.18.2 with 32 bytes of data:
 
Reply from 218.87.18.2: bytes=32 time=73ms TTL=254
Reply from 218.87.18.2: bytes=32 time=112ms TTL=254
Reply from 218.87.18.2: bytes=32 time=52ms TTL=254
Reply from 218.87.18.2: bytes=32 time=70ms TTL=254
 
Ping statistics for 218.87.18.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 52ms, Maximum = 112ms, Average = 76ms
 
PC>
 
PC>ping 192.168.2.1 Pinging 192.168.2.1 with 32 bytes of data:
 
Reply from 192.168.2.1: bytes=32 time=73ms TTL=254
Reply from 192.168.2.1: bytes=32 time=112ms TTL=254
Reply from 192.168.2.1: bytes=32 time=52ms TTL=254
Reply from 192.168.2.1: bytes=32 time=70ms TTL=254
 
Ping statistics for 192.168.2.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 52ms, Maximum = 112ms, Average = 76ms
 
PC>

PC>ping 192.168.3.1
 
Pinging 192.1683.1 with 32 bytes of data:
 
Reply from 192.168.3.1: bytes=32 time=73ms TTL=254
Reply from 192.168.3.1: bytes=32 time=112ms TTL=254
Reply from 192.168.3.1: bytes=32 time=52ms TTL=254
Reply from 192.168.3.1: bytes=32 time=70ms TTL=254
 
Ping statistics for 192.168.3.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 52ms, Maximum = 112ms, Average = 76ms
 
PC>
-   PC2:
 
PC>ipconfig
 
IP Address......................: 192.168.2.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.2.254
 
PC>ping 218.87.18.2
 
Pinging 218.87.18.2 with 32 bytes of data:
 
Reply from 218.87.18.2: bytes=32 time=39ms TTL=254
Reply from 218.87.18.2: bytes=32 time=44ms TTL=254
Reply from 218.87.18.2: bytes=32 time=58ms TTL=254
Reply from 218.87.18.2: bytes=32 time=29ms TTL=254
 
Ping statistics for 218.87.18.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 29ms, Maximum = 58ms, Average = 42ms
 
PC>
    -
 
PC3:
 
PC>ipconfig
 
IP Address......................: 192.168.3.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.3.254
 
PC>ping 218.87.18.2
 
Pinging 218.87.18.2 with 32 bytes of data:
 
Reply from 218.87.18.2: bytes=32 time=83ms TTL=254
Reply from 218.87.18.2: bytes=32 time=71ms TTL=254
Reply from 218.87.18.2: bytes=32 time=42ms TTL=254
Reply from 218.87.18.2: bytes=32 time=44ms TTL=254
 
Ping statistics for 218.87.18.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 42ms, Maximum = 83ms, Average = 60ms
 
PC>
 
 
总结:
 
本试验与实践中小企业网络十分类似,布置单臂路由既节省了本钱,又进步了工作功率.
版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表威尼斯人立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章