Cisco DHCP VLAN VTP STP VRRP OSPF

Source: Internet
Author: User

Ciso DHCP VLAN STP VTP VRRP OSPF


I. Topology

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/8E/A7/wKiom1jHxGmTRs6LAADyPg4IY1g214.png "title=" QQ picture 20170314182152.png "alt=" Wkiom1jhxgmtrs6laadypg4iy1g214.png "/>


Two. Interface configuration


IOU1 (config) # hostname DHCP

DHCP (config) # int e0/0

DHCP (config-if) # IP Add 1.1.1.1 255.255.255.0

DHCP (CONFIG-IF) # no shut

DHCP (config) # int E0/1

DHCP (config-if) # IP Add 2.2.2.1 255.255.255.0

DHCP (CONFIG-IF) # no shut


IOU2 (config) # hostname OSPF

OSPF (config) # int E0/2

OSPF (config-if) # IP Add 3.3.3.1 255.255.255.0

OSPF (CONFIG-IF) # no shut


IOU3 (config) # hostname switch1

Switch1 (config) # int e0/0

Switch1 (config-if) # no Switchport

Switch1 (config-if) # IP Add 1.1.1.2 255.255.255.0

Switch1 (config-if) # no shut


IOU4 (config) # hostname SWITCH2

Switch2 (config) # int E0/1

SWITCH2 (config-if) # no Switchport

SWITCH2 (config-if) # IP Add 2.2.2.2 255.255.255.0

SWITCH2 (config-if) # no shut

Switch2 (config) # int E0/1

SWITCH2 (config-if) # no Switchport

SWITCH2 (config-if) # IP Add 3.3.3.2 255.255.255.0

SWITCH2 (config-if) # no shut


Three. DHCP


DHCP (config) # ip dhcp pool vlan2.0

DHCP (dhcp-config) # Default-router 192.168.2.1

DHCP (dhcp-config) # network 192.168.2.0 255.255.255.0

DHCP (dhcp-config) # exit

DHCP (config) # ip dhcp pool vlan3.0

DHCP (dhcp-config) # Default-router 192.168.3.1

DHCP (dhcp-config) # network 192.168.3.0 255.255.255.0

DHCP (dhcp-config) # exit

DHCP (config) # ip dhcp excluded-address 192.168.2.1 192.168.2.10

DHCP (config) # ip dhcp excluded-address 192.168.3.1 192.168.3.10


Four. Vlan


switch1# VLAN Data

Switch1 (VLAN) # VLAN 2 name vlan2.0

Switch1 (VLAN) # VLAN 3 name vlan3.0

Switch1 (VLAN) #exit

switch1# conf t

Switch1 (config) # int VLAN 2

Switch1 (config-if) # IP Add 192.168.2.1 255.255.255.0

Switch1 (config-if) # IP helper-address 1.1.1.1

Switch1 (config-if) # no shut

Switch1 (config) # int VLAN 3

Switch1 (config-if) # IP Add 192.168.3.1 255.255.255.0

Switch1 (config-if) # IP helper-address 1.1.1.1

Switch1 (config-if) # no shut

Switch1 (config-if) # exit

Switch1 (config) # int e1/0

Switch1 (config-if) # switchport trunk Encapsulation dot1q

Switch1 (config-if) # switchport mode trunk


switch2# VLAN Data

SWITCH2 (VLAN) # VLAN 2 name vlan2.0

SWITCH2 (VLAN) # VLAN 3 name vlan3.0

SWITCH2 (VLAN) #exit

switch2# conf t

Switch2 (config) # int VLAN 2

SWITCH2 (config-if) # IP Add 192.168.2.2 255.255.255.0

SWITCH2 (config-if) # IP helper-address 1.1.1.1

SWITCH2 (config-if) # no shut

Switch2 (config) # int VLAN 3

SWITCH2 (config-if) # IP Add 192.168.3.2 255.255.255.0

SWITCH2 (config-if) # IP helper-address 1.1.1.1

SWITCH2 (config-if) # no shut

SWITCH2 (config-if) # exit

Switch2 (config) # int range e1/0-1

SWITCH2 (config-if) # switchport trunk Encapsulation dot1q

SWITCH2 (config-if) # switchport mode trunk


IOU5 (config) # no IP routing

IOU5 (config) # host SWITCH3

Switch3 (config) # exit

switch3# VLAN Data

SWITCH3 (VLAN) # VLAN 2 name vlan2.0

SWITCH3 (VLAN) # VLAN 3 name vlan3.0

SWITCH3 (VLAN) #exit

Switch3 (config) # int range e1/0-1

Switch3 (config-if) # switchport trunk Encapsulation dot1q

Switch3 (config-if) # switchport mode trunk

Switch3 (config) #exit

Switch3 (config) # int e2/0

Switch3 (config-if) # switchport Access VLAN 2


IOU6 (config) # no IP routing

IOU6 (config) # host SWITCH4

Switch4 (config) # exit

switch4# VLAN Data

SWITCH4 (VLAN) # VLAN 2 name vlan2.0

SWITCH4 (VLAN) # VLAN 3 name vlan3.0

SWITCH4 (VLAN) #exit

Switch4 (config) # int range e1/0

SWITCH4 (config-if) # switchport trunk Encapsulation dot1q

SWITCH4 (config-if) # switchport mode trunk

Switch4 (config) #exit

Switch4 (config) # int e2/0

SWITCH4 (config-if) # switchport Access VLAN 3


Five. OSPF


DHCP (config) # router OSPF 100

DHCP (config-router) # Router-id 10.10.10.10

DHCP (config-router) # network 1.1.1.0 0.0.0.255 a 0

DHCP (config-if) # network 2.2.2.0 0.0.0.255 a 0


Switch1 (config) # router OSPF 100

Switch1 (config-router) # Router-id 20.20.20.20

Switch1 (config-router) # network 1.1.1.0 0.0.0.255 a 0

Switch1 (config-router) # network 192.168.2.0 0.0.0.255 a 0

Switch1 (config-router) # network 192.168.3.0 0.0.0.255 a 0


Switch2 (config) # router OSPF 100

SWITCH2 (config-router) # Router-id 30.30.30.30

SWITCH2 (config-rotuer) # network 3.3.3.0 0.0.0.255 a 1

SWITCH2 (config-router) # network 192.168.2.0 0.0.0.255 a 0

SWITCH2 (config-router) # network 192.168.3.0 0.0.0.255 a 0


OSPF (config) # router OSPF 100

OSPF (config-router) # Router-id 40.40.40.40

OSPF (config-router) # network 3.3.3.0 0.0.0.255 a 1


Six. VRRP


Switch1 (config) # int VLAN 2

Switch1 (config-if) # VRRP 1 IP 192.168.2.254

Switch1 (config-if) # VRRP 1 preempt

Switch1 (config-if) # VRRP 1 priority 120

Switch1 (config-if) # VRRP 1 track 1

Switch1 (config-if) # VRRP 1 Track 2

Switch1 (config) # int VLAN 3

Switch1 (config-if) # VRRP 2 IP 192.168.3.254

Switch1 (config-if) # VRRP 2 preempt

Switch1 (config-if) # VRRP 2 Priority 95

Switch1 (config-if) # VRRP 2 track 1

Switch1 (config-if) # VRRP 2 track 2

Switch1 (config) # track 1 interface e1/0 Line-protocol

Switch1 (config) # track 2 interface e0/0 Line-protocol


Switch2 (config) # int VLAN 2

SWITCH2 (config-if) # VRRP 1 IP 192.168.2.254

SWITCH2 (config-if) # VRRP 1 preempt

SWITCH2 (config-if) # VRRP 1 priority 95

SWITCH2 (config-if) # VRRP 1 track 1

SWITCH2 (config-if) # VRRP 1 Track 2

Switch2 (config) # int VLAN 3

SWITCH2 (config-if) # VRRP 2 IP 192.168.3.254

SWITCH2 (config-if) # VRRP 2 preempt

SWITCH2 (config-if) # VRRP 2 Priority 120

SWITCH2 (config-if) # VRRP 2 track 1

SWITCH2 (config-if) # VRRP 2 track 2

Switch2 (config) # track 1 interface E1/1 Line-protocol

Switch2 (config) # track 2 interface E0/1 Line-protocol


Note: VRRP Test in IOU, virtual IP is not available, need to use is the local iOS test


Cisco DHCP VLAN VTP STP VRRP OSPF

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.