I was hoping to more than halfway done at this point, but there is a lot to learn and the labs are taking a little longer than I was hoping, but this is a good thing as the more I use the commands the better off I will be for the test and plus this will all be a reference for future review when I can’t remember commands 🙂
Section 20: OSPF – Open Shortest Path First
- OSPF Adjacencies
- Focus on the first three steps in the OSPF Operations
- OSPF Operations Review
- Discover neighbors
- Form adjacencies
- Flood LSDB (Link State Database)
- Compute the shortest path
- Install best routes in the routing table
- Respond to network changes
- OSPF Packet Types Review
- Hello – Used to find adjacent routers
- DBD (DataBase Description) packets – Used for adjacent routers to tell each other the networks they know about.
- LSR Link State Request – Used to populated missing info in the received DBD
- LSA (Link State Advertisement) – Route Update
- LSU (Link State Update) – List of LSA’s which should be updated, used during flooding
- LSAck – LSA acknowledgment
- OSPF Operations Review
- Hello Packets
- OSPF routers discover each other and form adjacencies via Hello packets
- Hello packets our sent out non-passive OSPF enabled interfaces.
- Multicast on 224.0.0.5 every 10 seconds
- Hello Packet Contents
- Router ID
- Hello Interval – Default 10 seconds
- Dead Interval – Default 4x Hello Interval
- Neighbors – list of adjacent OSPF routers that it has received Hello packets from
- Area ID –
- Router Priority – 8 bit number used to select DR (Designated Router) and BDR (Backup Designated Router)
- DR and BDR IPv4 Address – If known
- Authentication Flag – Auth details
- Stub Area Flag – uses ABR to connect two OSPF areas
- Routers must match for adjacency
- Must be each other’s Neighbor list
- Following must match
- Hello and Dead Intervals
- Area IDs
- IP Subnet
- Auth Flag
- Stub Area Flag
- OSPF DR and BDR Designated Routers
- When there are multiple routers in a multiaccess segment/subnet it is not effective for the routers to create a 1 to 1 link between each router to pass information.
- DR (Designated Router)
- Will control all replication for all routers on the segment
- BDR (Backup Designated Router)
- In place, if the DR goes down
- The DR and BDR are elected
- Router with the highest priority (0-255) becomes DR and the second-highest priority becomes BDR with the highest Router ID breaking a tie. Priority is set manually if not left at default which is 1.
- Set Priority to zero if you wish the router to not become a DR or BDR
- Ethernet interfaces will be considered a multiaccess segment and a DR/BDR will be designated, but serial connections are point to point and no DR/BDR will be advertised/elected.
- Router with the highest priority (0-255) becomes DR and the second-highest priority becomes BDR with the highest Router ID breaking a tie. Priority is set manually if not left at default which is 1.
- OSPF Priority Command
- (config#interface [interface]
- (config-if)#ip ospf priority [0-255]
- OSPF restart on the interface for change to take place
- Restart router
- Disable/Enable interface
- Clear OSPF
- command: #clear ip ospf process
- This does not cause a full election and the BDR will remain the same and the command would need to be restarted on the old BDR or the old DR for the BDR to change.
- OSPF restart on the interface for change to take place
- In the case of four routers on a segment, the DR and BDR will be in a full state communication with all the routers to pass information, the two routers that are not a DR or BDR, they will reside in a 2-way state to ensure each other are up and running but will not passing routing information.
- If there is a link-state change an LSU packet is sent multicast over 224.0.0.6 to all designated routers
- DR will multicast the update on 224.0.0.5 to all OSPF routers
- OSPF Areas
- Potential issues
- Too many routes can use up to much memory
- Network changes on large networks can take a long time to reconverge and use a lot of CPU resources
- Resolution for large networks
- OSPF supports a hierarchical design, large networks into smaller areas
- Transit area (backbone/area 0), generally does not contain users
- Regular areas connect end-users to the transit area to connect to other areas
- Routers maintains full info about its own area and summary info about other areas
- OSPF supports a hierarchical design, large networks into smaller areas
- Router types
- Backbone contains all routes for area 0
- ABR (Area Border Router) and contains multiple areas
- Separates LSA flooding zones
- Summarizes area address
- Source for default routes
- Maintains the LSDB for each area that is it connected to
- Recommended that it is only connected to two areas
- Summarisation is not automatic and needs to be configured manually
- (config-router)#area [area id] range [network address] [subnet]
- Summary routes will show in the ‘#show ip route’ as ‘O IA’ which is OSPF inter area
- ASBR (Autonomous System Boundry Router)
- it is running OSPF but it is providing routes from another source
- Example: RIP, EIGRP or static routes being distributed from another source
- From “#show ip route’ it will show up as O*E1 or O*E2 route
- it is running OSPF but it is providing routes from another source
- Potential issues
- Focus on the first three steps in the OSPF Operations
Section 21: VLANs Virtual Local Area Networks
- VLAN
- Operate at Layer 3
- Separate IP subnets and need a router to be able to communicate.
- Provide performance and security by splitting networks into smaller domains
- Layer 2 Switches broadcast traffic everywhere including between different IP subnets
- VLAN Access Ports
- Where end hosts are plugged in.
- Have one VLAN
- end host is not VLAN aware
- VLAN commands
- Create VLAN
- (config)#vlan [vlan#]
- (config-vlan)#name [text]
- Assign interface to VLAN
- (config)#interface [interface] – Single interface
- For multiple interfaces: (config)#interface range [interface range]
- (config-if)#switchport mode access
- (config-if)#switchport access vlan [vlan#]
- (config)#interface [interface] – Single interface
- Trunk Ports
- Dot1Q Trunk Port
- Tags layer 2 Dot1Q header with correct VLAN
- Receiving switch only forwards traffic out to requested VLAN ports
- Dot1Q tad is removed from frame when it sends to the end host
- Trunk Commands
- (config)#interface [interface]
- (config-interface)#description [text]
- (config-interface)#switchport trunk encapsulation dot1q
- (config-interface)#switchport mode trunk
- Access Trunk Port
- (config)#interface [interface]
- (config-interface)#description [text]
- (config-interface)#switchport mode access
- (config-interface)#switchport access vlan 10
- (config-interface)#switchport voice vlan 20
- Native VLAN
- Switch needs to know which VLAN to assign to any traffic which is untagged on a trunk port
- Default VLAN is VLAN 1
- It is recommended to change to a different VLAN then VLAN 1 for security concerns.
- native VLAN must match on both sides of a trunk for it to come up
- Native VLAN Configuration Command
- Create VLAN
- (config)#vlan [vlan#]
- (config-vlan)#name [test description: Native]
- Configure Trunk Port
- (config)#interface [interface]
- (config-interface)#description [text]
- (config-interface)#switchport trunk encapsulation dot1q
- (config-interface)#switchport mode trunk
- (config-interface)#switchport trunk native vlan 199
- Create VLAN
- Allow VLAN over Trunk
- (config)# interface [interface]
- (config-interface)#switchport trunk allowed vlan [vlan#s separated by a comma]
- DTP Dynamic Trunking Protocol
- It is recommended not to use DTP and to manually configure the access and trunk ports
- DTP configuration commands
- #Switchport mode dynamic auto
- Will form a trunk if the neighbor switch port is set to trunk or desirable.
- #Switchport mode dynamic desirable
- Will form a trunk if the neighbor switch port is set to trunk, desirable or auto
- #Switchport nonegotiate
- disables DTP
- #Switchport mode dynamic auto
- VTP VLAN Trunking Protocol
- Allows you to add, edit or delete VLANs on switches configured as VTP server
- Switches configured as VTP clients synchronize their VLAN database with VTP servers
- Good for large campus
- If switch with a hight VLAN database revision number in the domain it can wipe out all your production VLANs
- VTP domain name has to match on neighbor switches for DTP trunks to be formed.
- VTP Modes
- VTP Server
- Can add, edit or delete VLANs
- Sync VLAN database from another server with a higher revision number
- VTP Client
- Cannot add, edit or delete VLANs
- Sync VLAN database from the server with the highest revision number
- VTP Transparent
- Does not participate in the VTP domain
- Can add, edit or delete VLANs in its own local VLAN database
- VTP Server
- VTP Commands
- Create a VTP domain
- (config)#vtp domain [Domain name]
- Assign device VTP mode
- Server
- (config)#vtp mode server
- Client
- (config#vtp mode client
- Transpaent
- (config)#vtp mode transparent
- Server
- Verification
- #show vtp status
- Create a VTP domain
- Dot1Q Trunk Port
- Create VLAN
Section 22: Inter-VLAN Routing
- Router with separate Interfaces
- Config like it is a regular setup, no special setup.
- Router on a Stick
- Create a sub interface on the router and use the same setting as a physical interface
- Commands
- Enable router the interface that will be used
- (config)#interface [interface: example: f0/1]
- (config-interface)#no ip address
- (config-interface)#no shutdown
- Create VLAN interface
- (config)#interface [interface: example: f0/1.10]
- (config)#encapsulation dot1q 10
- (config-interface)#ip address [ip address] [subnet]
- (config)#interface [interface: example: f0/1.10]
- (config)#encapsulation dot1q 20
- (config-interface)#ip address [ip address] [subnet]
- Set switch trunk
- (config)#interface [interface]
- (config-if)#switchport mode trunk
- Enable router the interface that will be used
- Layer 3 Switch
- Use SVI (Switched Virtual Interfaces) for the gateways interfaces
- Inter-VLAN Routing Configuration Commands
- (config)#ip routing
- (config)#interface vlan [vlan1#]
- (config-if)#ip address [gateway ip address] [gateway subnet]
- (config)#interface vlan [vlan2#]
- (config-if)#ip address [gateway ip address] [gateway subnet]
- WAN Routing Configuration
- Switch Example
- (config)#interface F0/1
- (config-if)#no switchport
- (config-if#ip address 10.10.100.1 255.255.255.0
- (config)#ip route 0.0.0.0 0.0.0.0 10.10.100.2
- Router
- (config)#interface f0/1
- (config-interface)#ip address 10.10.100.2 255.255.255.0
- (config)#interface f0/2
- (config-interface)#ip address 203.0.113.1 255.255.255.0
- (config)#ip route 0.0.0.0 0.0.0.0 203.0.113.2
- (config)#ip route 10.10.0.0 255.255.0.0.10.10.100.1
- Switch Example