单臂路由!!!!终于搞定你了,,,

来源:互联网 发布:网络促销策划书模板 编辑:程序博客网 时间:2024/05/01 20:33

终于搞定了路由+交换机 的单臂路由了,,气死我了,一样的配置,,用那两个模拟器,竟连有的命令都不支持,,郁闷,,

C2900交换机:
switch>en
switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)#exit
switch#vlan database
switch(vlan)#vlan 2 name xiaofam2
switch(vlan)#vlan 3 name xiaofam3
switch(vlan)#exit
switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)#int f0/8
switch(config-if)#switchport mode trunk
switch(config-if)#switchport ?

access vlan <n>
mode trunk
trunk allowed vlan <n>
trunk encap dot1q

switch(config-if)#switchport trunk ?

allowed vlan <n>
encapsulation dot1q

switch(config-if)#switchport trunk encapsulation dot1q
switch(config-if)#exit
switch(config)#int f0/1
switch(config-if)#switchport mode access
switch(config-if)#switchport access vlan 2
switch(config-if)#exit
switch(config)#int f0/2
switch(config-if)#switchport mode access
switch(config-if)#switchport access vlan 3
switch(config-if)#exit
switch(config)#exit
switch#show vlan

Vlan Name Status  Ports
-------   --------   ----------   ------------------------
1      default  Active  F0/3, F0/4, F0/5, F0/6, F0/7
2      xiaofam2  Active  F0/1
3      xiaofam3  Active  F0/2
1002  fddi-d  Active
1004  fnet-d  Active

VLAN Type  SAID        MTU
--------  -------  --------------  --------
1        enet  100001    1500
1002  fddi   101002    1500
1002  fnet   101003    1500

switch# 

2621路由器:
router>en
router#config
?
router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
router(config)#int f0/0
router(config-if)#no shut
router(config-if)#exit
router(config)#exit
router#show run
Building configuration...

Current configuration : 729 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname  
!
enable secret  $1$3Ws&^f
enable password 
!
ip subnet-zero
no ip routing
!
!
!
!
!
interface FastEthernet0/0
!
!
 no ip mroute-cache
 half-duplex
!
!
interface FastEthernet0/1
!
!
 no ip mroute-cache
 duplex auto
shutdown
!
interface Serial0/0
!
!
 no ip mroute-cache
!
shutdown
!
interface Serial0/1
!
!
 no ip mroute-cache
!
shutdown
!
ip classless
no ip http server
ip pim bidir-enable
!
snmp-server community public RO
!
line con 0
password

line aux 0

line vty 0 4
password

!
!
end

router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
router(config)#int f0/0.1
router(config-subif.1)#ip addr 192.168.10.1 255.255.255.0
router(config-subif.1)#?
router(config-subif.1)#encapsulation ?
router(config-subif.1)#encapsulation dot1q 2 native
router(config-subif.1)#exit
router(config--if)#exit
router(config)#int f0/0.2
router(config-subif.2)#ip addr 192.168.20.1 255.255.255.0
router(config-subif.2)#encapsulation dot1q 3 native
router(config-subif.2)#exit
router(config--if)#exit
router#show run
Building configuration...

Current configuration : 729 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname  
!
enable secret  $1$3Ws&^f
enable password 
!
ip subnet-zero
no ip routing
!
!
!
!
!
interface FastEthernet0/0
f0/0.1 ip: 192.168.10.1 255.255.255.0   dot1q : e
f0/0.2 ip: 192.168.20.1 255.255.255.0   dot1q : e
 no ip mroute-cache
 half-duplex
!
!
interface FastEthernet0/1
!
!
 no ip mroute-cache
 duplex auto
shutdown
!
interface Serial0/0
!
!
 no ip mroute-cache
!
shutdown
!
interface Serial0/1
!
!
 no ip mroute-cache
!
shutdown
!
ip classless
no ip http server
ip pim bidir-enable
!
snmp-server community public RO
!
line con 0
password

line aux 0

line vty 0 4
password

!
!
end

router#show run
Building configuration...

Current configuration : 729 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname  
!
enable secret  $1$3Ws&^f
enable password 
!
ip subnet-zero
no ip routing
!
!
!
!
!
interface FastEthernet0/0
f0/0.1 ip: 192.168.10.1 255.255.255.0   dot1q : e
f0/0.2 ip: 192.168.20.1 255.255.255.0   dot1q : e
 no ip mroute-cache
 half-duplex
!
!
interface FastEthernet0/1
!
!
 no ip mroute-cache
 duplex auto
shutdown
!
interface Serial0/0
!
!
 no ip mroute-cache
!
shutdown
!
interface Serial0/1
!
!
 no ip mroute-cache
!
shutdown
!
ip classless
no ip http server
ip pim bidir-enable
!
snmp-server community public RO
!
line con 0
password

line aux 0

line vty 0 4
password

!
!
end

router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
router(config)#ip routing
router(config)#

另外,配置两个PC,,分别为
192。168。10。2 /24     gw:192.168.10.1
192.168.20.2/24    gw:192.168.20.1

这样就搞定的了,,,,

原创粉丝点击