howtonetwork.net

Cisco Certification Training

  • Products
  • CCNA
    • CCNA Videos
    • CCNA Lectures
    • CCNA Practice Exams
    • Challenge Labs
      • Challenge Video Solutions
    • Cisco Commands
  • CCNP ROUTE
    • ROUTE Exams
  • CCNP SWITCH
    • SWITCH Exams
  • CCNP TSHOOT
  • Home
  • Join
  • Downloads
  • About Us
  • Whitepapers
  • Feature Articles
  • Helpdesk
  • FAQ
  • Free Training
You are here: Home / ip default-gateway

ip default-gateway

Command

IP Default-Gateway

Use

Provides a default-gateway for the switch to send all unknown IP packets. Allows proper communication between switches and routers.

Syntax

Switch(config)#ip default-gateway <ip address>

Example

ip default-gateway

In the below example we will configure SW1 to use a default-gateway to ping R1’s loopback0. First, we will configure R1’s Fa0/0 and Loopback0 interfaces.

R1(config-if)#int fa0/0
R1(config-if)#ip add 10.1.1.1 255.255.255.0
R1(config-if)#int loop0
R1(config-if)#ip add 1.1.1.1 255.255.255.0

 

Next we configure int VLAN 1 on SW1 so it can communicate with R1 via IP.

SW2(config)#int vlan 1
SW2(config-if)#ip address 10.1.1.254 255.255.255.0

Finally we configure a default gateway on SW1 so all unknown traffic is sent to R1. We then see that the ping is successful.

SW1(config)#ip default-gateway 10.1.1.1
SW1(config)#do ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/9 ms
SW1(config)#

Get access to over 5 hours of IT webinar videos as well as regular study tips and ideas when you
join our mailing list

About This Site

We replaced this site some time ago with an upgraded version. Please feel free to enjoy the content and if you like what you see check out our brilliant new site:

howtonetwork.com

Keep In Touch

About Us

This is a free access website which has now been replaced by howtonetwork.com.

Navigation

  • Home
  • Join
  • Downloads
  • About Us
  • Whitepapers
  • Feature Articles
  • Helpdesk
  • FAQ
  • Free Training

Copyright

All content is protected by international copyright laws. Copyright Reality Press Ltd.

Copyright © 2023 · Dynamik Website Builder on Genesis Framework · WordPress · Log in