Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

ARP HSRP DHCP OSPF STP protocol

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Wednesday, 15 November 2017

Don't forget the original ideal and ambition to accomplish the mission.

Ali Yun-Darnay-Red Hat

- -

How ARP works:

1. Send the request-the request is the MAC corresponding to the IP address.

The message is sent by broadcasting.

ARP: (request)

Source-ip: A-IP

Source-mac: A-MAC

Target-ip: C-IP

Target-mac: 000000000000

2. Receive a response-the host corresponding to the IP address sends back the MAC of the host

The message is sent by unicast.

ARP: (reply)

Source-ip: C-IP

Source-mac: C-MAC

Target-ip: A-IP

Target-mac: A-MAC

-

HSRP

HSRP: hot backup routing protocol

Gateway redundancy Protocol:

HSRP-Cisco Private Protocol

VRRP-Public Standard

(just change the standby in the configuration command of HSRP to vrrp.)

Function:

It ensures that when the network edge device or access link fails, the user communication can be restored quickly and transparently, thus providing redundancy for the IP network.

By using the same virtual IP address and virtual MAC address, two or more routers on the LAN segment can serve as one virtual router.

HSRP configuration ideas:

Premise:

A consensus must be reached-

Gateway is the concept of "interface" of a device; so the relevance of HSRP

The configuration must be configured under the Gateway Interface

1. Enable HSRP on the gateway (port) and configure the virtual gateway IP address

GW1/2:

Interface gi0/0

Standby 10 ip 192.168.10.250

2. On the main gateway (port), adjust the priority of HSRP. The bigger the better.

GW1: / / configure GW1 as the primary gateway

Interface gi0/0

Standby 10 priority 105

3. Enable HSRP preemption on the gateway (port)

GW1:

Interface gi0/0

Standby 10 preempt

4. Configure the gateway IP of the terminal device to "the IP address of the virtual gateway".

PC1 192.168.10.1 PC2 192.168.10.2

255.255.255.0 255.255.255.0

192.168.10.250 192.168.10.250

5. Verification and testing

Show standby-> View information about HSRP

Debug ip icmp-- > View the message processing information of ICMP

HSRP external link tracking:

When the external link of the gateway is disconnected, the HSRP will automatically decrease.

Your own priority. The reduction of priority can be done manually.

Configured; (on the simulator, it cannot be configured and can only be reduced by a fixed 10)

Configuration commands:

Interface gi0/0

Standby 10 track interface gi0/1 [X]

Note:

Parameter X is only available on real devices.

Represents the manually specified reduction in priority.

Load balancing of HSRP

-background

The role of the standby gateway when both the primary gateway and the standby gateway are OK

Just backup, that is, the utilization rate of the device is only 50%, so

There is a problem of waste of equipment / low utilization of equipment.

Therefore, HSRP began to support the traffic "load balancing" function.

That is, when both the primary gateway and the standby gateway are OK

The traffic is forwarded through both gateways at the same time.

The utilization of gateway equipment is improved.

If the primary gateway dies, the traffic that was previously forwarded through the primary gateway

It will be forwarded through the standby gateway, and the "gateway backup" will still be realized.

The function of.

-method:

HSRP group, or HSRP group

-configuration:

0. Premise: use "multilayer switch" as "gateway device"

1. SW1 is used as the main gateway device of VLAN1-2, and the priority is set to 105.

And enable the HSRP preemption function for these VLAN gateways

Interface Vlan1

Ip address 192.168.1.1 255.255.255.0

Standby 1 ip 192.168.1.250

Standby 1 priority 105

Standby 1 preempt

!

Interface Vlan2

Ip address 192.168.2.1 255.255.255.0

Standby 2 ip 192.168.2.250

Standby 2 priority 105

Standby 2 preempt

!

Interface Vlan3

Ip address 192.168.3.1 255.255.255.0

Standby 3 ip 192.168.3.250

!

Interface Vlan4

Ip address 192.168.4.1 255.255.255.0

Standby 4 ip 192.168.4.250

2. SW2 is used as the main gateway device of VLAN3-4, and the priority is set to 105.

And enable the HSRP preemption function for these VLAN gateways

Interface Vlan1

Ip address 192.168.1.2 255.255.255.0

Standby 1 ip 192.168.1.250

!

Interface Vlan2

Ip address 192.168.2.2 255.255.255.0

Standby 2 ip 192.168.2.250

!

Interface Vlan3

Ip address 192.168.3.2 255.255.255.0

Standby 3 ip 192.168.3.250

Standby 3 priority 105

Standby 3 preempt

!

Interface Vlan4

Ip address 192.168.4.2 255.255.255.0

Standby 4 ip 192.168.4.250

Standby 4 priority 105

Standby 4 preempt

3. Configure IP-related information of member hosts of each VLAN

4. Configure link tracking for HSRP

5. Verification and testing

- -

OSPF-redistribute

-what?

A common dynamic routing protocol; of the link-state protocol type

-function:

Dynamically learn and calculate routing entries between routers

-principle:

1. Establish a connection table

2. Synchronize the database

3. Calculate the routing table

-message:

1 、 hello

2 、 DBD

3 、 LSU

4 、 LSR

5 、 LSAck

-Route announcement: (integrate the route into the data air)

1 、 network

-for directly connected links only

-can put the "network address" of the link in the database

-it's still possible.

Send and receive OSPF messages on this link / multiport

2 、 redistribute

-can be used for all types of rout

-you can only plan to put the corresponding type of route into the database

-No.

Let the corresponding link of the route send / receive OSPF messages

- -

DHCP-Dynamic Host Configuration Protocol

-what

Dynamic host configuration protocol

-function: automatically assign IP addresses to hosts

-principle: DHCP- server

Function: assign IP address

Type: router / switch / SERVER

DHCP- client

Function: request IP address

-working process:

After the client is powered on, send a DHCP discover message

After the server is received, check the local free IP address

Respond to a DHCP offer message

The client can expect to use the first DHCP offer message at the meeting

Send back a DHCP request message

The server will return a DHCP Ack message

- -

STP

-what

Spanning-tree protocol, spanning Tree Protocol

-effect

In layer 2 network / switched network, link redundancy is realized while loop is prevented.

-implementation

-switch role

Root switch

Non-root switch

-Election principles:

# any switch has a name in STP

BID-bridge id, bridge ID

# composition of BID:

Priority + MAC address

2Byte 6Byte

# compare:

First of all, compare the priority, the smaller the better.

Secondly, compare MAC. The smaller the better.

-Port role

Root port:

On any non-root switch

There is one and only one

Distance from the root switch

Nearest port

Designated port:

Any "collision domain / network segment"

There is one and only one

Distance from the root switch

Nearest port

Non-designated port:

Other ports are called "non-designated ports"

A representation of the distance to the root switch:

Cost-cost

10m-100

100m-19

1G-2

-Port statu

Down: disconnecting

Listening: listening, this state remains for 15s

Learning: learning, this state is maintained for 15s

Forwarding: forwardin

Block: blocking

Disabled: disablin

-

STP convergence time: 30s---50s

Hello-time: 2s, the time for the switch to send BPDU periodically

Forward-delay: 15s, forwarding delay. In the listening and learning state, stay for 15 seconds respectively.

Max-age:20s, maximum survival time.

STP message:

BPDU-bridge protocol data unit: bridge protocol data unit

Root-ID / / indicates the ID information of the root switch

Cost / / indicates the distance to the root switch

BID / / indicates the ID of the switch that sent the BPDU

Port-ID / / indicates the egress port of the BPDU

Note:

The cost in BPDU, which accumulates along the way in the process of transmission, will transmit direction, all,

The cost value of the input port, which is accumulated.

Base MAC View Command:

Show version

-base mac-address:

View information about spanning Tree:

Show spanning-tree

Change the STP priority of the switch:

SW4 (config) # spanning-tree vlan 1 priority 4096

STP: spanning Tree, 802.1d Public Standard-PVST- > per-vlan STP

RSTP: rapid spanning Tree, 802.1w, Public Standard

MSTP: multiple spanning trees, 802.1s, public standard

Note:

In fact, PVST (PVST+) is now running by default on the device.

That is STP based on VLAN.

With the introduction of VLAN in STP, you can implement

Load balancing of data traffic.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report