Traceroute – Notes

Below are the points listed to know about the Traceroute function

  • There are 3 types of Traceroute – UDP traceroute, ICMP traceroute, TCP traceroute
  • UDP traceroute is by default in most of the OS. Windows OS tracert is ICMP based

Consider UDP traceroute for the below example

RTR0 ———— RTR1 ————– RTR2 ———- Destination

  • When you do a traceroute on a router RTR0, it generates an ICMP packet with Source and Destination IP address with a UDP port no. of 33434 to 33534 with TTL 1.
  • The next router/ hop RTR1 receiving this ICMP packet, looks at the TTL value 1 and discard it.
  • RTR1 sends a ICMP Time exceed message to RTR0 with its IP address and UDP port no.
  • For each TTL value, RTR0 sends 3 ICMP messages with sequential UDP port nos., this is done to calculate the RTT (Round Trip Time) of the packet
  • After receiving the ICMP Time exceed message from RTR1, RTR0 records the information and generates another ICMP message with TTL 2.
  • This time RTR1 passes the ICMP message to next router RTR2 after decrementing the TTL value to 1.
  • RTR2 does the same process as RTR1 when it sees the ICMP message with TTL 1, it drops the packet and sends the ICMP Time exceed message to RTR0.
  • This process repeats for 30 hops or till the ICMP message reaches the Destination.
  • RTR0 identifies the ICMP packet has reached the destination by receiving a ICMP Destination/ Port unreachable message.

ICMP Traceroute gets a ICMP echo reply from the destination instead of ICMP Destination/ Port unreachable message

TCP Traceroute sends a TCP SYN packet instead of ICMP message. It receives a TCP RST or TCP SYNACK from the destination. Once receiving the SYNACK message, TCP RST is sent from RTR0 to Destination and connection is not established.

Leave a comment

Filed under routing, switching

Spanning Tree Protocol (STP)

Layer 2 frames doesn’t have a mechanism to avoid switching loops by itself like a TTL in Layer 3. So IEEE standard 802.1D Spanning tree protocol (STP) is used to avoid the switching path loops by creating a single path between the source and destination.

..contd

Leave a comment

Filed under stp, switching

Questions – Rapid Spanning Tree Protocol (RSTP)

I have listed RSTP questions below for learning

  1. What are the port roles in RSTP
  2. What are the states of ports in RSTP
  3. How RSTP acheives faster convergence
  4. What is proposal/ agreement process
  5. What is the port role and port state when the link comes up initially
  6. What is the message type field in RSTP BPDU

I will add further

Leave a comment

Filed under rstp, switching

Questions – Spanning Tree Protocol (STP)

I have listed some of the STP questions below for learning.

  1. Why STP bridge priority is the multiples of 4096
  2. What are the states of STP ports
  3. What are the different timers used in STP
  4. What is the port identifier and where it is used
  5. What are the different BPDUs, explain
  6. What is the default priority of spanning-tree root primary/secondary
  7. What will be the source address and destination address of a BPDU sent by a bridge
  8. Explain STP BPDU frame format
  9. What is the default convergence time of STP
  10. Explain the process after a topology is changed
  11. How root bridge will notify all the bridges about a topology change and what happens in the bridges after that
  12. How STP will work in EtherChannel
  13. What is MessageAge and MaxAge
  14. What is meant by the diameter in STP
  15. When does the BPDU information recieved in a root port will expire
  16. What is the message type field in STP BPDU
  17. What is UplinkFast and BackBoneFast, explain

Leave a comment

Filed under stp, switching

OSPF network types

Here I am listing the operations of those network types

Broadcast, multi-access network – single mode of operation
Point-to-point network – single mode of operation
NBMA network – five modes

Non-Broadcast – RFC
Point-to-multipoint – RFC
Point-to-point – Cisco prop.
Broadcast – Cisco prop.
Point-to-multipoint – Cisco prop.

Non-Broadcast mode (Default mode)
- No broadcast, multicast are allowed.
- Neighbors should be statically configured since no multicast is allowed.
- All Frame-relay/ATM network should be in same subnet similar like LAN environment.
- In star topology, only DR can be elected since it is connected to all the neighbors. No BDR should be present so we change the OSPF priority to ‘0’.
- Configure neighbor statically in DR in OSPF router mode and in the interface mode in neighbor router.

Point-to-multipoint mode
- No DR/BDR election is happened
- Only requirement is the network/ router should be allowed to pass multicast
- Configure ‘ip ospf network point-to-multipoint’ in Cisco and most of the routers in the OSPF interface
- Timer remains the same as the NBMA network (30secs, 120 secs, 120 secs).

Point-to-multipoint (non-broadcast) mode
- Cisco came up with this this to overcome the point-to-multipoint network without broadcast/ multicast network.
- Works as the same as point-to-multipoint, but neighbors need to be configured statically since no multicast is allowed.

Point-to-point
- Uses seperate sub-interfaces.
- Different subnets for each sub-interface.
- No DR/ BDR election is happened.
- Neighbors are automatically formed.

Leave a comment

Filed under ospf, routing

Operation of OSPF protocol

General

- OSPF has three tables

  • Neighbor table – List of all neighbors.
  • Topology table – Has the entire map of the whole area.
  • Routing table – Best path to the destination.

- Uses Dijkstra’s shortest path first (SPF) algorithm to find the best path
- Sends triggered updates
- Sends periodic updates (LS refresh) on long intervals
- All areas must connect to area 0
- All routers in an Area have the same topology table
- Localize updates within an area
- Requires a hierarchical design – Connect or advertise all the subnet of the same class in a single area
- ABR has interface connected to multiple areas along with Area 0
- ASBR is connected to the internet/ other routing protocol
- Only ABR and ASBR can do summarization

Neighbor relationship

- Neighbors formed only with routers within same area
- Router-ID will be used to identify the neighbors
- Highest active ip address or loopback ip adress configured will be the router-id of the router
- Router-ID will only change when ospf process is cleared or router is rebooted
- When you create highest loopback ip address, the router-id will not change until the ospf process is cleared or rebooted
- When the router-id is changed, we loose all the existing ospf information. So to overcome this, execute the command #router-id xx.xx.xx.xx in ospf process
- Router-ID command has the highest priority
- Sends HELLO messages on all the interfaces which are given in the #network command
- Hello messages

  • 10 secs on broadcast/ point-to-point links
  • 30 secs on NBMA networks

- Dead timer is 4 times on Hello timer.
- Inside Hello message
Hello and Dead timers*
Network mask*
Area ID*
Router priority
DR/BDR address
Authenticaton*
* – Should be equal on the neighbors.
- When a Hello is received, the router checks the NEIGHBOR field in its neighbor table, if its existing neighbor, it will update or it will add the new neighbor in its neighbor table.

OSPF States

- While the peer router receives the Hello packets, the ospf process is changed to INIT state from DOWN state while checking all the Hello packet parameters are same
- After this router sends the reply Hello, the OSPF state is changed to 2-WAY
- Until here, if it is already a neighbor the Dead timer and Hello timer is updated and the process is ended here.
- If its a new neighbor, the MASTER-SLAVE relationship is determined, its in EX-START state.
- Master sends the topology/ link state information first to its neighbor, its in EXCHANGE state.
- Process of selecting the Master

- Higher the router priority or router-id.

  • Master sends the DBD to the slave. DBD has the summary of the link-state information.
  • Then Slave sends the DBD to Master

- While the DBD is reviewed by each neighbor, the OSPF process is in LOADING state.
- If the slave finds a new network in DBD of master, it sends the LSR to master asking for the details of the particular network
- Master will reply with LSU for that LSR.
- Individual LSR is sent for each unknown network
- After this process, OSPF is in FULL state

DB/ BDR

- When a link goes down, immediately an update is sent to all the neighbors. Neighbors further update to their neighbors except from where they received the update.
- In Broadcast network, this would create a lot of bandwidth and SPF is calculated frequently. To overcome this, DR and BDR is elected in broadcast network.
- Whenever a link is down, the router sends the update to DR/BDR in 224.0.0.6 multicast address.
- DR will send this update to all its neighbors in 224.0.0.5 multicast address.
- DR/BDR will be selected in all and each shared segment
- In PPP link, no DR/BDR is selected and uses 224.0.0.5 address.
- DR is selected based on the router priority and router-id.
- IN broadcast network, all the routers form neighborship with DR/BDR. i.e all the router to DR/BDR are in FULL state and the neighborship to other router will be in 2-Way state.
- Only two FULL state is formed (DR and BDR).

Leave a comment

Filed under ospf, routing

Basics of OSPF protocol

OSPF is a network layer protocol that uses protocol number 89.

For better understanding, I will explain briefly about the parameters used in OSPF in divisions

OSPF uses its own communication packets to its neighbors for various transitions.

  • Hello packet
  • Database Description packet (DBD)
  • Link State Request (LSR)
  • Link State Update (LSU)
  • Link State Acknowledgement

Hello packet - This packet is sent when the OSPF is configured on the router on the interfaces to form neighbors with its peers. The newly learn neighbor is stored in the neighbor database table and the peer will also update accordingly its neighbor table. And further these Hello packets are sent in regular intervals to let know the neighbor that the router is still present. If the router doesnt receive Hello packet for a particular time period (Hold-down time) from its neighbor, then that neighbor is removed from the neighbor table and sends LSA to all other neighbors.

Database Description packet (DBD) – Once the neighbor adjacency is formed, each router will send its complete topology table information as DBD to its neighbor.

Link State Request (LSR) – Once the DBD is received from the neighbor router, this router will verify the entries present in the DBD to its topology table. If any networks that are not found in the topology table, this routers sends LSR to that neighbor for that particular network. For each unknown network, individual LSRs will be sent. These requests are placed in LSR table, so that if the LSU is not received for the particular LSR, then this LSR is again retransmitted.

Link State Update (LSU) – LSU is the Link State Advertisements (LSA) that are sent to the OSPF domain. Single LSU packet may carry many number of Link State Advertisements in it. The neighbor router receiving LSR packet for the particular network will be replied with the LSU for that network.

Link State Acknowledgement – Link State Acknowledgment is sent to LSU, LSR and DBD packets. A single LSA packet can be combined to send the acknowledgement for multiple various other packets based on its configuration whether it is implicit or explicit.

LSA

LSAs are differentiated into 11 types.

Link State Advertisements abbreviated as LSA is used to send the topology information of the local area to the neighbor routers in the same area. When the LSA is sent to other area (i.e ABR) the topology information is summarized.

Types of LSA

There are 11 LSAs in OSPF, but practically we may come across 6 LSAs

Type-1 Router LSA – This LSA is sent across single area by each router to let know its presence to other routers in that area.

Type-2 Network LSA – This LSA is sent by DR to other routers in that broadcast domain.

Type-3 Summary LSA (Sent by ABR) – This LSA is sent by ABR, the networks of one area is summarized/ not summarized and advertised to other area by this LSA.

Type-4 ASBR Summary LSA (Sent by ASBR) – This LSA is sent by ASBR to let know its presence in an area.

Type-5 External LSA – Other routing protocols injected into OSPF domain are sent to other area by this LSA.

Type-7 External LSA for Not So Stubby Area – This LSA is sent by ASBR in Not So Stubby Area to advertise external routing protocols in this area as Type -5 LSA does not flow in Stub area.

LSAs which we dont use in day-to-day scenarios so just listing it below

Type-6 Group Membership LSA

Type-8 Link-local only LSA used for OSPFv3

Type-9 Link-local opaque LSA

Type-10 Area-local opaque LSA

Type-11 Autonomous system opaque LSA

All the above LSAs uses a 20-byte LSA header for their operation in OSPF networks.

Types of Networks/links configured on the OSPF interface

Based on the network configured on the OSPF interface, forwarding of broadcast/ multicast, election of DR/BDR, timers like Hello/Dead interval, auto-discovery of neighbors etc

Broadcast (Cisco) - This is similar to a LAN network. DR/BDR is elected on this network.

Point-to-point (Cisco) – It has only one neighbor connected on its interface. No DR/BDR is elected on this network.

Point-to-multipoint (non-broadcast) (Cisco) -This type of network comes under non-broadcast capability. No Broadcast and multicast packets are forwarded in this network, so neighbors should be configured manually for this network. Each link is a separate subnet. ‘non-broadcast’ command should be added while configuring the point-to-multipoint network.

Non-Broadcast – In this network, no DR/BDR election does not happen since no broadcast and multicast packets doesnt flow. We need to manually configure the DR router and neighbors for the each router. This is the default network for FR/ATM networks

Point-to-multipoint - This is similar to the cisco proprietary Point-to-multipoint (non-broadcast) but here broadcasts and multicasts are allowed, so the neighbors are automatically learnt. Each link is a separate subnet

Types of routers

Internal Routers – The router with all its OSPF configured interfaces are part of a single area. It can be of any single area (i.e need not to be only area 0)

Backbone area Routers - The router with all its OSPF configured interfaces are part of single area and its of area 0

Area Border Router (ABR) - The router with any of the OSPF configured interface is part of Backbone area (area 0) and another interface connected to other area.

Autonomous system Boundary Router (ASBR) - The router with atleast one OSPF configured interface is connected to OSPF area. This router is responsible for redistributing other protocol routes to OSPF domain.

Leave a comment

Filed under ospf, routing