Cisco Packet Tracer交换机路由器划分(VLAN,静态路由,RIP,OSPF,DHCP,等长子网)

文章目录

  • 交换机划分vlan
    • Switch0
    • Switch1
  • 静态路由
    • Router1
    • Router2
  • 动态路由-OSPF-1
    • Router0
    • Router1
    • Router2
  • 动态路由-OSPF-2
    • Router0
    • Router1
    • Router2
  • 动态路由-RIP
    • Router0
    • Router1
    • Router2
  • 路由器DHCP服务
    • Router0
  • RIP+DHCP
    • Router0
    • Router1
  • 等长子网划分
    • Router0
    • Router1
    • Router2
    • Router3
    • Router4
  • SNMP
    • Router0
    • Switch0
    • PC0

交换机划分vlan

Switch_2960 1 台;Swithc_3560 1 台;PC 3 台;直连线

Cisco Packet Tracer交换机路由器划分(VLAN,静态路由,RIP,OSPF,DHCP,等长子网)_第1张图片

Switch0

en
conf t
vlan 2 
exit
vlan 3 
exit
interface fa 0/1 
switch access vlan 2
exit
interface fa 0/2 
switch access vlan 3
exit
inter fa 0/24 
switchport mode trunk
end
show vlan

Switch1

en
conf t
vlan 2
exit
vlan 3
exit
interface fa 0/1
switchport access vlan 2
exit
inter fa 0/2
switchport access vlan 3
exit
inter fa 0/24
switch mode trunk
end
show vlan

静态路由

pc 2 台;Router-PT 可扩展路由 2 台;Switch_2960 2 台;DCE 串口线;直连线;交叉线

Cisco Packet Tracer交换机路由器划分(VLAN,静态路由,RIP,OSPF,DHCP,等长子网)_第2张图片

Router1

en
conf t
inter fa 1/0 
ip address 192.168.1.1 255.255.255.0
no shutdown 
exit
inter serial 2/0 
ip address 192.168.3.1 255.255.255.0
clock rate 64000 
no shutdown 
exit
ip route 192.168.2.0 255.255.255.0 192.168.3.2
exit

Router2

en
conf t
inter fa 1/0
ip address 192.168.2.1 255.255.255.0
no shutdown
exit
inter serial 2/0
ip address 192.168.3.2 255.255.255.0
no shutdown
exit
ip route 192.168.1.0 255.255.255.0 192.168.3.1
exit

动态路由-OSPF-1

Cisco Packet Tracer交换机路由器划分(VLAN,静态路由,RIP,OSPF,DHCP,等长子网)_第3张图片

Router0

en
conf t
int f0/0
no shutdown
ip address 192.168.1.1 255.255.255.0
exit
int f0/1
no shutdown
ip address 192.168.2.1 255.255.255.0
exit
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
exit
exit

Router1

en
conf t
int f0/0
no shutdown
ip address 192.168.2.2 255.255.255.0
exit
int f0/1
no shutdown
ip address 192.168.3.1 255.255.255.0
exit
router ospf 1
network 192.168.2.2 0.0.0.255 area 0
network 192.168.3.1 0.0.0.255 area 0
exit
exit

Router2

en
conf t
int f0/0
no shutdown
ip address 192.168.3.2 255.255.255.0
exit
int f0/1
no shutdown
ip address 192.168.4.1 255.255.255.0
exit
router ospf 1
network 192.168.3.2 0.0.0.255 area 0
network 192.168.4.1 0.0.0.255 area 0
exit
exit

动态路由-OSPF-2

Cisco Packet Tracer交换机路由器划分(VLAN,静态路由,RIP,OSPF,DHCP,等长子网)_第4张图片

Router0

en
conf t
inter fa 0/1
ip address 192.168.1.1 255.255.255.0
no shutdown 
exit
inter fa 0/0
ip address 192.168.2.1 255.255.255.0
no shutdown 
exit
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
exit
exit

Router1

en
conf t
inter fa 0/0
ip address 192.168.2.2 255.255.255.0
no shutdown 
exit
inter fa 0/1
ip address 192.168.3.1 255.255.255.0
no shutdown 
exit
interface serial 0/0/0
ip address 192.168.4.1 255.255.255.0 
clock rate 64000 
no shutdown 
exit
router ospf 1
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
network 192.168.4.0 0.0.0.255 area 0
exit
exit

Router2

en
conf t
inter fa 0/0
ip address 192.168.5.1 255.255.255.0
no shutdown 
exit
interface serial 0/0/0
ip address 192.168.4.2 255.255.255.0 
no shutdown 
exit
router ospf 1
network 192.168.4.0 0.0.0.255 area 0
network 192.168.5.0 0.0.0.255 area 0
exit
exit

动态路由-RIP

Cisco Packet Tracer交换机路由器划分(VLAN,静态路由,RIP,OSPF,DHCP,等长子网)_第5张图片

Router0

en
conf t
int f0/0
no shutdown
ip address 192.168.1.1 255.255.255.0
exit
int f0/1
no shutdown
ip address 192.168.2.1 255.255.255.0
exit
router rip 
network 192.168.1.1
network 192.168.2.1
exit
exit

Router1

en
conf t
int f0/0
no shutdown
ip address 192.168.2.2 255.255.255.0
exit
int f0/1
no shutdown
ip address 192.168.3.1 255.255.255.0
exit
router rip 
network 192.168.3.1
network 192.168.2.2
exit
exit

Router2

en
conf t
int f0/0
no shutdown
ip address 192.168.3.2 255.255.255.0
exit
int f0/1
no shutdown
ip address 192.168.4.1 255.255.255.0
exit
router rip 
network 192.168.3.2
network 192.168.4.1
exit
exit

路由器DHCP服务

Cisco Packet Tracer交换机路由器划分(VLAN,静态路由,RIP,OSPF,DHCP,等长子网)_第6张图片

Router0

enable
configure terminal    
int f0/0 
no shutdown
ip address 192.168.1.1 255.255.255.0
ip dhcp pool xiao1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
exit
int f0/1 
no shutdown
ip address 192.168.2.1 255.255.255.0
ip dhcp pool xiao2
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
exit
ip dhcp excluded-address 192.168.1.1
ip dhcp excluded-address 192.168.2.1
exit

RIP+DHCP

Cisco Packet Tracer交换机路由器划分(VLAN,静态路由,RIP,OSPF,DHCP,等长子网)_第7张图片

Router0

enable
configure terminal    
int f0/0 
no shutdown
ip address 192.168.1.1 255.255.255.0
ip dhcp pool xiao1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
exit
ip dhcp excluded-address 192.168.1.1
int f0/1 
no shutdown
ip address 192.168.2.1 255.255.255.0
exit
router rip 
network 192.168.1.1
network 192.168.2.1
exit
exit

Router1

enable
configure terminal 
int f0/0 
no shutdown
ip address 192.168.2.2 255.255.255.0
exit
int f0/1 
no shutdown
ip address 192.168.3.1 255.255.255.0
ip dhcp pool xiao2
network 192.168.3.0 255.255.255.0
default-router 192.168.3.1
exit
ip dhcp excluded-address 192.168.3.1
router rip 
network 192.168.3.1
network 192.168.2.2
exit
exit

等长子网划分

Cisco Packet Tracer交换机路由器划分(VLAN,静态路由,RIP,OSPF,DHCP,等长子网)_第8张图片

Router0

enable
configure terminal    
int f0/0 
no shutdown
ip address 192.168.55.33 255.255.255.224
ip dhcp pool xiao1
network 192.168.55.32 255.255.255.224
default-router 192.168.55.33
exit
ip dhcp excluded-address 192.168.55.33
int f0/1 
no shutdown
ip address 192.168.66.2 255.255.255.0
exit
router rip 
version 2
network 192.168.55.33
network 192.168.66.2
no auto-summary
exit
exit

Router1

enable
configure terminal    
int f0/1
no shutdown
ip address 192.168.55.65 255.255.255.224
ip dhcp pool xiao1
network 192.168.55.64 255.255.255.224
default-router 192.168.55.65
exit
ip dhcp excluded-address 192.168.55.65
int f0/0 
no shutdown
ip address 192.168.66.3 255.255.255.0
exit
router rip 
version 2
network 192.168.55.65
network 192.168.66.3
no auto-summary
exit
exit

Router2

enable
configure terminal    
int f0/1
no shutdown
ip address 192.168.55.97 255.255.255.224
ip dhcp pool xiao1
network 192.168.55.96 255.255.255.224
default-router 192.168.55.97
exit
ip dhcp excluded-address 192.168.55.97
int f0/0 
no shutdown
ip address 192.168.66.4 255.255.255.0
exit
router rip 
version 2
network 192.168.55.97
network 192.168.66.4
no auto-summary
exit
exit

Router3

en
conf t
int f0/0
no shutdown
ip address 192.168.66.1 255.255.255.0
exit
int f0/1
no shutdown
ip address 192.168.88.1 255.255.255.0
exit
router rip 
version 2
network 192.168.66.1
network 192.168.88.1
no auto-summary
exit
exit

Router4

en
conf t
int f0/0
no shutdown
ip address 192.168.99.1 255.255.255.0
ip dhcp pool xiao1
network 192.168.99.0 255.255.255.0
default-router 192.168.99.1
exit
ip dhcp excluded-address 192.168.99.1
int f0/1
no shutdown
ip address 192.168.88.2 255.255.255.0
exit
router rip 
version 2
network 192.168.99.1
network 192.168.88.2
no auto-summary
exit
exit

SNMP

Cisco Packet Tracer交换机路由器划分(VLAN,静态路由,RIP,OSPF,DHCP,等长子网)_第9张图片

Cisco Packet Tracer交换机路由器划分(VLAN,静态路由,RIP,OSPF,DHCP,等长子网)_第10张图片

Router0

en
conf t
hostname RO
int fastEthernet 0/0
ip address 192.168.0.1 255.255.255.0
no shutdown 
exit
snmp-server community xiaoxiaoran rw
exit

Switch0

en
conf t
int vlan1
ip address 192.168.0.2 255.255.255.0
no shutdown 
exit
snmp-server community xiaoxiaoran rw
exit

PC0

.1.3.6.1.2.1.1.5.0

你可能感兴趣的:(计算机网络,网络)