You are on page 1of 10

1.

STP

After the Max Age time (20 s by default) elapses, each switch will assume that it is a root bridge, all port
roles will become designated ports, and the ports will transition to the listening state.
By default, a switch’s STP function is enabled. If STP is disabled, use the stp

enable command in the system view to enable STP.

#On S1, set the spanning tree operating mode to STP. Use the stp mode {mstp|

rstp|stp} command, from which you can set the mode to MSTP, RSTP, or

STP. The mode is set to MSTP by default.

<Quidway> system-view

[Quidway] sysname S1

[S1] stp mode stp

2.VLAN
# Configure S1.

<S1> system-view

[S1] vlan 10

[S1-vlan10] quit

After the VLAN is configured, run the display port vlan command to view the VLAN configurations and
types of the ports on switch.

The Generic Attribute Registration Protocol (GARP) defined by IEEE effectively reduces the manual
workload in VLAN configuration. GARP includes two protocols:

GARP Multicast Registration Protocol (GMRP) and GARP VLAN Registration Protocol (GVRP). Manually
created VLANs are called static VLANs, and VLANs created by the

GVRP are called dynamic VLANs. GVRP allows VLAN attribute transmission between switches to
implement dynamic VLAN registration and deregistration on

switches. After configuring GVRP, you only need to manually configure VLANs on a few switches, and
then these switches deliver VLAN configurations to other

switches.

Configuration Roadmap

1. Enable GVRP on each switch globally and on related ports.

2. Configure Layer 2 connectivity between switches by configuring required ports as Trunk ports,
allowing frames from VLAN 1000 to pass through.

3. Manually create VLAN 1000 on S1 and S4.

Run the gvrp command in the system view of a switch to enable GVRP globally.

# Enable GVRP on S1 globally.

<Quidway> system-view

[Quidway] sysname S1
[S1] gvrp

Configure the Related Ports

1. Enable GVRP on a port. (Note: GVRP must be globally enabled on a switch before it is enabled on a
port of the switch.)

2. Configure the related ports as Trunk ports and allow frames from VLAN 1000 to pass through. (GVRP
can be configured only on Trunk ports.)

# Configure S1’s ports.

[S1] interface gigabitethernet 1/0/2

[S1-GigabitEthernet1/0/2] gvrp

[S1-GigabitEthernet1/0/2] port link-type trunk

[S1-GigabitEthernet1/0/2] port trunk allow-pass vlan all

[S1-GigabitEthernet1/0/2] quit

Run the following commands to verify the configuration:

• display gvrp status: shows whether GVRP is globally enabled.

• display gvrp statistics: displays GVRP statistics on each port.

VID -12 bits –VLAN identifier- Specifies the VLAN that the frame belongs to with value ranges from 1 to
4094 (values 0 and 4095 are

reserved for other purposes respectively)

3.IP BASIC.
4.TCP and UDP.
TCP Session Setup

TCP Session termination


TCP acknowledgement and retransmission
Routing
Essentially, a route is a network-layer path from a network device to a destination, and a routing table
stores information about routes. Routing tables are stored on routers, computers, and Layer 3 switches
(not Layer 2 switches) and function like a database, in which information specific to each route is called
a routing entry.

To check the routing table, run the display ip routing-table command on R1.

Route Preference

Deciding which of the three routes is to be injected into the IP routing table for packet forwarding
depends on route preferences.

Route Cost

Each route to a destination/mask is attributed a cost. If a routing protocol discovers multiple routes to
the same destination/mask, the route with the smallest cost is
selected and injected into this protocol’s routing table.
If a router concurrently runs multiple routing protocols and each one discovers one or more routes to
the same destination/mask (for example, z/y), each routing
protocol will select an optimal route based on the cost and inject the optimal route into the protocol’s
routing table. Then, the optimal route with the highest preference
among the optimal routes of all routing protocols is injected into the router’s IP routing table. If the
router also has direct and static routes to z/y, these routes are
included in the route selection process together with the optimal routes discovered by routing
protocols. Only the route with the highest preference is injected into the
IP routing table.

Static Route Configuration Example


RIP
To understand what a routing protocol is, you must first understand the basics of autonomous systems
(ASs). In network communications, an AS is a set of Layer 2

networks and routers administered by a single entity. An internetwork can contain one or more ASs.

Routing protocols are classified as interior gateway protocols (IGPs) or exterior gateway protocols
(EGPs). IGPs are used to exchange routing information with

routers in the same AS. IGPs include Routing Information Protocol (RIP), Open Shortest Path First
(OSPF), and Intermediate System to Intermediate System

(IS-IS). EGPs are used between routers in different ASs. An example of an EGP is Border Gateway
Protocol (BGP), which is the only EGP currently used.

Basic Principles of RIP

RIP is a distance-vector IGP and has a preference of 100. RIP uses a hop count as the route cost. A hop
count is the number of routers

through which a packet passes to reach its destination.

When a RIP router initially creates a RIP routing table, this table is in the initial state and contains only
the direct routes that the router has automatically discovered.

Once every 30 s, each RIP router sends to all of its neighbors an update message that contains all routing
information stored in its updated RIP routing

table. The RIP routers then use the routing information they receive to update their RIP routing tables.
After RIP route convergence is complete, RIP routing tables no

longer change and, instead, enter the stable state. A RIP routing table in the stable state contains routes
to all destinations on the RIP network; however, the exchange

of routing information continues so that, if the network topology changes, each RIP routing table is
updated accordingly.

RIP routers exchange two types of RIP messages: request and response messages. When a RIP router
starts up, it sends a RIP request to all of its neighbors to request
routing information of the entire RIP network. A running RIP router can also send such a message. Upon
receipt of a RIP request, a RIP router immediately replies

with a RIP response that contains the routing information of which the router is aware. In addition, each
RIP router sends to all of its neighbors, every 30 s, a RIP

response messages that contains its updated RIP routing information.

RIP-2 extends the message format of RIP-1, allowing RIP routers to share additional information. Most
importantly, RIP-2 messages can carry subnet mask

information, whereas RIP-1 message cannot. Therefore, RIP-2 supports classless routing and variable
length subnet mask (VLSM) and classless inter-domain routing

(CIDR), whereas RIP-1 applies only to classful addressing scenarios in which the default mask is used to
implement classfull routing.

Both RIP-1 and RIP-2 messages are encapsulated into UDP packets, which are sent and received on the
port numbered 520.

Compared with RIP-1, RIP-2 has the following advantages:

• Added functions. RIP-2 supports classless routes and VLSM and CIDR, whereas RIP-1 supports only
classful routes.

• Enhanced security. RIP-2 supports authentication, whereas RIP-1 does not.

• Consumption of fewer processing resources. RIP-2 can use multicast to advertise messages, whereas
RIP-1 cannot.

RIP uses three timers: update timer(30), invalid timer(180), and garbage-collection timer(120).

Routing loops disrupt network operation. To address this problem, RIP provides triggered update, split
horizon, and poison reverse.

Split horizon prevents routes being sent from a RIP interface back to the interface from which the routes
were learned, thereby preventing routing loops.

RIP configuration example


After completing the configuration, check the configurations. Run the display rip [process-id] command
on each router to check the RIP configurations.
Run the display rip process-id route command on R1 to check RIP routes learned from other routers.

OSPF
Open Shortest Path First (OSPF) is a link-state Interior Gateway Protocol (IGP).

An AS running OSPF as its IGP is an OSPF network.

You might also like