创建局域网,两个Vlan如何联通?(主要交换机的配置命令)

2024-11-26 02:05:15
推荐回答(3个)
回答1:

Cisco的命令我可以说一下先在其他交换机建立两个vlan之后 在三层交换机上面启用路由功能 再再三层交换机上添加vlan先建立vlan# vlan database(vlan)# vlan 10 (vlan)# vlan 20 (vlan)# exit启用路由:# conf t(config)# ip routing在三层交换机上把vlan添加比如(config)# interface vlan10192.168.1.1 255.255.255.0其他也类似 注意三层交换机(就是上面的中心交换机 )和其他交换机连接的端口要封装trunk

回答2:

Router1改名
Router>
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname router1配置端口f0/0
router1(config)#int f0/0
router1(config-if)#ip address 172.16.1.1 255.255.255.0
router1(config-if)#no shutdown
%LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up配置端口s0
router1(config-if)#int s0
router1(config-if)#ip address 172.16.2.1 255.255.255.0
router1(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down配置时钟频率
router1(config-if)#clock rate 64000
router1(config-if)#no shutdown
router1(config-if)#exit设置静态路由
router1(config)#ip route 172.16.3.0 255.255.255.0 172.16.2.2
router1(config)#end

回答3:

switch(config)#ip routingswitch(config)#vlan 2switch(config)#vlan 3switch(config)#int vlan 2switch(config-if)#ip add 192.168.2.1 255.255.255.0switch(config-if)#no shutswitch(config)#int vlan 3switch(config-if)#ip add 192.168.3.1 255.255.255.0switch(config-if)#no shut