COMP 008 - Data Communications & Networking (1) PDF
Document Details
Uploaded by AmpleConnemara878
Polytechnic University of the Philippines
Tags
Summary
This document covers basic router configuration, including initial settings and configuring devices to use the default gateway. It also includes examples of commands for configuring interfaces. The document contains an assessment section regarding router configuration.
Full Transcript
77 CHAPTER 9 – BASIC ROUTER CONFIGURATION Introduction Basic Router Configuration Implement initial settings on a router and end devices. Objectives At the end of this topic, Learners must be able to: Configure initial settings on an IOS router. Configur...
77 CHAPTER 9 – BASIC ROUTER CONFIGURATION Introduction Basic Router Configuration Implement initial settings on a router and end devices. Objectives At the end of this topic, Learners must be able to: Configure initial settings on an IOS router. Configure two active interfaces on a IOS router. Configure devices to use the default gateway. Configure Initial Router Settings Basic Router Configuration Steps Router(config)# hostname hostname Configure the device name. Secure privileged EXEC mode. Router(config)# line console 0 Router(config-line)# password password Secure user EXEC mode. Router(config-line)# login Secure remote Telnet / SSH Router(config)# enable secret password access. Router(config)# line vty 0 4 Router(config-line)# password password Encrypt all plaintext passwords. Router(config-line)# login Router(config-line)# transport input {ssh | telnet} Provide legal notification and save the configuration Router(config)# service password encryption Router(config)# banner motd # message # Router(config)# end Router# copy running-config startup-config Basic Router Configuration Example R1(config)# hostname R1 Commands for basic router R1(config)# enable secret class configuration on R1. R1(config)# line console 0 Configuration is saved to R1(config-line)# password cisco R1(config-line)# login NVRAM. R1(config-line)# line vty 0 4 R1(config-line)# password cisco R1(config-line)# login R1(config-line)# transport input ssh telnet R1(config-line)# exit R1(config)# service password encryption R1(config)# banner motd # Enter TEXT message. End with a new line and the # *********************************************** WARNING: Unauthorized access is prohibited! ********************************************** R1(config)# exit R1# copy running-config startup-config Instructional Material in COMP 20173 - Data Communications and Networking 78 Configure Interfaces Configure Router Interfaces Configuring a router interface includes issuing the following commands: Router(config)# interface type-and-number Router(config-if)# description description-text Router(config-if)# ip address ipv4-address subnet-mask Router(config-if)# ipv6 address ipv6-address/prefix-length Router(config-if)# no shutdown It is a good practice to use the description command to add information about the network connected to the interface. The no shutdown command activates the interface. Configure Router Interfaces Example The commands to configure interface G0/0/0 on R1 are shown here: R1(config)# interface gigabitEthernet 0/0/0 R1(config-if)# description Link to LAN R1(config-if)# ip address 192.168.10.1 255.255.255.0 R1(config-if)# ipv6 address 2001:db8:acad:10::1/64 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# *Aug 1 01:43:53.435: %LINK-3-UPDOWN: Interface GigabitEthernet0/0/0, changed state to down *Aug 1 01:43:56.447: %LINK-3-UPDOWN: Interface GigabitEthernet0/0/0, changed state to up *Aug 1 01:43:57.447: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/0, changed state to up Instructional Material in COMP 20173 - Data Communications and Networking 79 The commands to configure interface G0/0/1 on R1 are shown here: R1(config)# interface gigabitEthernet 0/0/1 R1(config-if)# description Link to R2 R1(config-if)# ip address 209.165.200.225 255.255.255.252 R1(config-if)# ipv6 address 2001:db8:feed:224::1/64 R1(config-if)# no shutdown R1(config-if)# exit R1(config)# *Aug 1 01:46:29.170: %LINK-3-UPDOWN: Interface GigabitEthernet0/0/1, changed state to down *Aug 1 01:46:32.171: %LINK-3-UPDOWN: Interface GigabitEthernet0/0/1, changed state to up *Aug 1 01:46:33.171: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/1, changed state to up Verify Interface Configuration To verify interface configuration, use the show ip interface brief and show ipv6 interface brief commands shown here: R1# show ip interface brief Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0/0 192.168.10.1 YES manual up up GigabitEthernet0/0/1 209.165.200.225 YES manual up up Vlan1 unassigned YES unset administratively down down R1# show ipv6 interface brief GigabitEthernet0/0/0 [up/up] FE80::201:C9FF:FE89:4501 2001:DB8:ACAD:10::1 GigabitEthernet0/0/1 [up/up] FE80::201:C9FF:FE89:4502 2001:DB8:FEED:224::1 Vlan1 [administratively down/down] unassigned R1# Instructional Material in COMP 20173 - Data Communications and Networking 80 Configure Verification Commands The table summarizes show commands used to verify interface configuration. Commands Description show ip interface brief Displays all interfaces, their IP addresses, and their show ipv6 interface brief current status. show ip route Displays the contents of the IP routing tables stored in show ipv6 route RAM. show interfaces Displays statistics for all interfaces on the device. Only displays the IPv4 addressing information. show ip interfaces Displays the IPv4 statistics for all interfaces on a router. show ipv6 interfaces Displays the IPv6 statistics for all interfaces on a router. Configure the Default Gateway Default Gateway on a Host The default gateway is used when a host sends a packet to a device on another network. The default gateway address is generally the router interface address attached to the local network of the host. To reach PC3, PC1 addresses a packet with the IPv4 address of PC3, but forwards the packet to its default gateway, the G0/0/0 interface of R1. Note: The IP address of the host and the router interface must be in the same network. Default Gateway on a Switch A switch must have a default gateway address configured to remotely manage the switch from another network. To configure an IPv4 default gateway on a switch, use the ip default-gateway ip-address global configuration command. Instructional Material in COMP 20173 - Data Communications and Networking 81 Assessment 1. What tasks should be completed when initially configuring a router? 2. What is the purpose of configuring a banner message on a router? 3. What is the benefit of configuring a description on a router interface? 4. What are some popular show commands used to verify router interface configuration? 5. What information does an end device need to have to communicate with remote networks? 6. Why would a switch need to be configured with a default gateway? Instructional Material in COMP 20173 - Data Communications and Networking