单臂路由器配置 代码 思科

拓扑图




switch代码

Switch>enable 
Switch#conf terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#exit
Switch(config)#int fa0/1
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#int fa0/2
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#end


%SYS-5-CONFIG_I: Configured from console by console
Switch#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.


Switch(config)#int fa0/24
Switch(config-if)#switchport mode trunk 
Switch(config-if)#end


router代码


Router>enable 
Router#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#no ip address 
Router(config-if)#no shutdown 


%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up


%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up


Router(config-if)#int
                   ^
% Invalid input detected at '^' marker.

Router(config-if)#exit


Router(config)#interface fa0/0.10


%LINK-5-CHANGED: Interface FastEthernet0/0.10, changed state to up


%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.10, changed state to up
Router(config-subif)#interface fa0/0.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 192.168.1.254 255.255.255.0


Router(config-subif)#no shutdown 
Router(config-subif)#
Router(config-subif)#int fa0/0.20


%LINK-5-CHANGED: Interface FastEthernet0/0.20, changed state to up


%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.20, changed state to up


Router(config-subif)#int fa0/0.20
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 192.168.2.254 255.255.255.0
Router(config-subif)#no shutdown 
Router(config-subif)#end
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值