+ Reply to Thread
Results 1 to 24 of 24
  1. Senior Member bcall64's Avatar
    Join Date
    Dec 2009
    Location
    Morrisville, NC
    Posts
    156

    Certifications
    CCENT
    #1

    Default Default Gateway packet tracer switch

    I'm trying to add the default gateway on a switch in packet tracer and it's not working. Here is what I have.

    S1(config)#ip default-gateway 192.168.1.1 255.255.255.0
    %unrecognized command

    I'm looking deeper into it and it doesn't have it as a command for this multilayer switch in packet tracer. I'm following Odom's book and it says I should enter that as part of my VLAN config. Anyone else run into this? I see default-network but no gateway.

    S1(config)#ip ?
    access-list Named access-list
    default-network Flags networks as candidates for default routes
    dhcp Configure DHCP server and relay parameters
    domain IP DNS Resolver
    domain-lookup Enable IP Domain Name System hostname translation
    domain-name Define the default domain name
    forward-protocol Controls forwarding of physical and directed IP broadcasts
    host Add an entry to the ip hostname table
    name-server Specify address of name server to use
    nat NAT configuration commands
    route Establish static routes
    routing Enable IP routing
    ssh secure shell configuration
    Reply With Quote Quote  

  2. SS -->
  3. Cisco Moderator mikej412's Avatar
    Join Date
    May 2005
    Location
    Chicago
    Posts
    10,190

    Certifications
    CCNP CCIP CCSP CCVP CCDP CCDA CCNA CS-CIPSS CS-CIPTDS CS-CIPTOS CS-CIPCSS CS-CFWS CS-CVPNS CS-CISecS ISSP 4013 4011
    #2
    If you work your way through the CLI help using the ? you'll find that the ip default-gateway command doesn't require (or want) a subnet mask.

    Code:
    S2950-2(config)#ip default-gateway ?
      A.B.C.D  IP address of default gateway
    
    S2950-2(config)#ip default-gateway 192.168.1.1 ?
      <cr>
    
    S2950-2(config)#ip default-gateway 192.168.1.1
    Reply With Quote Quote  

  4. Senior Member bcall64's Avatar
    Join Date
    Dec 2009
    Location
    Morrisville, NC
    Posts
    156

    Certifications
    CCENT
    #3
    Quote Originally Posted by mikej412 View Post
    If you work your way through the CLI help using the ? you'll find that the ip default-gateway command doesn't require (or want) a subnet mask.

    Code:
    S2950-2(config)#ip default-gateway ?
      A.B.C.D  IP address of default gateway
    
    S2950-2(config)#ip default-gateway 192.168.1.1 ?
      <cr>
    
    S2950-2(config)#ip default-gateway 192.168.1.1
    Yeah but the command isn't even available. My worry is that packet tracer may have a bug in it.

    S1(config)#ip default-gateway 192.168.1.1
    ^
    % Invalid input detected at '^' marker.

    It's a multi layer switch. The 2950 however does have the default gateway command so I can just use that to learn what I need.

    I think it's because of the IOS version difference. the 2950 is 12.1 and the multilayer is 12.2. I would assume 12.2 is newer or no? I forget how the versions are determined with the CISCO IOS.

    2950: IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1)

    Multilayer: Cisco IOS Software, C3560 Software (C3560-ADVIPSERVICESK9-M), Version 12.2(37)SE1, RELEASE SOFTWARE (fc1)
    Reply With Quote Quote  

  5. Senior Member
    Join Date
    Apr 2009
    Posts
    5,015
    #4
    What version of PT are you using? I am using 5.0

    This is from a 2950
    Switch>en
    Switch#config t
    Enter configuration commands, one per line. End with CNTL/Z.
    Switch(config)#ip
    Switch(config)#ip d?
    default-gateway domain-lookup
    Switch(config)#ip d
    Switch(config)#ip defaul
    Switch(config)#ip default-gateway ?
    A.B.C.D IP address of default gateway
    Switch(config)#ip default-gateway 1.1.1.1
    Switch(config)#
    Reply With Quote Quote  

  6. Senior Member
    Join Date
    Nov 2003
    Location
    England
    Posts
    178

    Certifications
    CCNA, MCP.
    #5
    It's a layer 3 switch, routing built in, meaning no need for a default gateway in the sense of being a client pc/layer2 switch.
    Reply With Quote Quote  

  7. Senior Member bcall64's Avatar
    Join Date
    Dec 2009
    Location
    Morrisville, NC
    Posts
    156

    Certifications
    CCENT
    #6
    Quote Originally Posted by knwminus View Post
    What version of PT are you using? I am using 5.0

    This is from a 2950
    Switch>en
    Switch#config t
    Enter configuration commands, one per line. End with CNTL/Z.
    Switch(config)#ip
    Switch(config)#ip d?
    default-gateway domain-lookup
    Switch(config)#ip d
    Switch(config)#ip defaul
    Switch(config)#ip default-gateway ?
    A.B.C.D IP address of default gateway
    Switch(config)#ip default-gateway 1.1.1.1
    Switch(config)#

    Yeah the 2950 has the correct command in it. However, only the multi layer switch has the ip-domain name command and I assume that's because it's a layer 3 switch. The layer 3 switch does not have the default gateway command. ::sigh:: I would like both.
    Reply With Quote Quote  

  8. Senior Member bcall64's Avatar
    Join Date
    Dec 2009
    Location
    Morrisville, NC
    Posts
    156

    Certifications
    CCENT
    #7
    Quote Originally Posted by hexem View Post
    It's a layer 3 switch, routing built in, meaning no need for a default gateway in the sense of being a client pc/layer2 switch.
    That would explain why the command is not there. Thanks for clearing that up!
    Reply With Quote Quote  

  9. Cisco Moderator mikej412's Avatar
    Join Date
    May 2005
    Location
    Chicago
    Posts
    10,190

    Certifications
    CCNP CCIP CCSP CCVP CCDP CCDA CCNA CS-CIPSS CS-CIPTDS CS-CIPTOS CS-CIPCSS CS-CFWS CS-CVPNS CS-CISecS ISSP 4013 4011
    #8
    Quote Originally Posted by bcall64 View Post
    That would explain why the command is not there.
    Actually, it doesn't....

    Here's a REAL 3550 switch
    Code:
    S3550-1#config t
    Enter configuration commands, one per line.  End with CNTL/Z.
    S3550-1(config)#ip d?
    default-gateway  default-network  device       dhcp           dhcp-client
    dhcp-server      domain           domain-list  domain-lookup  domain-name
    dvmrp            
    
    S3550-1(config)#ip default
    S3550-1(config)#ip default-g
    S3550-1(config)#ip default-gateway ?
      A.B.C.D  IP address of default gateway
    
    S3550-1(config)#ip default-gateway
    The reason you don't have the command is that you are using a LIMITED FUNCTION SIMULATOR. Rather than show all the real options/commands that the Simulator doesn't support, it just doesn't list them. And even when it does show you a command, unless it's one of the basic CCNA command, it may not work like the real hardware.
    Last edited by mikej412; 02-10-2010 at 09:18 PM.
    Reply With Quote Quote  

  10. Senior Member
    Join Date
    Nov 2003
    Location
    England
    Posts
    178

    Certifications
    CCNA, MCP.
    #9
    my bad as far as simulation goes for switche's, it would seem nothing will beat real hardware anyway.
    Reply With Quote Quote  

  11. Senior Member bcall64's Avatar
    Join Date
    Dec 2009
    Location
    Morrisville, NC
    Posts
    156

    Certifications
    CCENT
    #10
    I just don't have a switch on my budget. I know I can use GNS3 for routing but it doesn't have what I need for switching (at least that I am aware of). I have GNS3 ready and some IOS images ready to go for GNS once I get to routing.
    Reply With Quote Quote  

  12. Senior Member
    Join Date
    Nov 2003
    Location
    England
    Posts
    178

    Certifications
    CCNA, MCP.
    #11
    as far as im aware, you don't really need to be using a multi-layered switch at CCNA level anyway, from what iv'e read you do that in CCNP, if you are wanting to route between vlan's then you can use a router on a stick with subinterfaces, which you will come to eventually in you're studies if you haven't already.
    Reply With Quote Quote  

  13. Senior Member bcall64's Avatar
    Join Date
    Dec 2009
    Location
    Morrisville, NC
    Posts
    156

    Certifications
    CCENT
    #12
    Quote Originally Posted by hexem View Post
    as far as im aware, you don't really need to be using a multi-layered switch at CCNA level anyway, from what iv'e read you do that in CCNP, if you are wanting to route between vlan's then you can use a router on a stick with subinterfaces, which you will come to eventually in you're studies if you haven't already.
    Yeah the reason I was using the multi-layered switch was because some of the commands were missing in packet tracer for the regular switch. I'm half tempted to talking my fiance into just letting me drop a couple hundred bucks to build a simple lab. It would be so much easier to work with real hardware.
    Reply With Quote Quote  

  14. Senior Member bcall64's Avatar
    Join Date
    Dec 2009
    Location
    Morrisville, NC
    Posts
    156

    Certifications
    CCENT
    #13
    Quote Originally Posted by bcall64 View Post
    Yeah the reason I was using the multi-layered switch was because some of the commands were missing in packet tracer for the regular switch. I'm half tempted to talking my fiance into just letting me drop a couple hundred bucks to build a simple lab. It would be so much easier to work with real hardware.
    I'm going to check out router on a stick as well.
    Reply With Quote Quote  

  15. Senior Member thenjduke's Avatar
    Join Date
    Jun 2005
    Location
    TN
    Posts
    892

    Certifications
    MCP, MCSA, MCSE, MCITP EA, MCSE 2012, CCNA, VCP 5, CCA, CCEE, CCIA, CCE-V
    #14
    I went the route of hardware as well.
    Reply With Quote Quote  

  16. Digital Drifter
    Join Date
    Mar 2010
    Posts
    48
    #15
    hey guys just a question how can I telnet to a switch from a remote LAN so I can configure it remotely?

    is it the ip default gateway command?

    can i just use any ip address?
    Reply With Quote Quote  

  17. Senior Member bcall64's Avatar
    Join Date
    Dec 2009
    Location
    Morrisville, NC
    Posts
    156

    Certifications
    CCENT
    #16
    Quote Originally Posted by super22 View Post
    hey guys just a question how can I telnet to a switch from a remote LAN so I can configure it remotely?

    is it the ip default gateway command?

    can i just use any ip address?
    Ok doing this from memory so forgive me if I miss something. My exam is Monday.

    First of all you need to configure your vty lines. So...

    Router#conf t
    Router#(Config)line vty 0 4
    Router#(Config-if)password password
    Router#(Config-if)login
    Router#(Config-if)transport input telnet
    Router#(Config-if)exit
    Router#(Config)int vlan 1
    Router#(Config-if)ip address 192.168.1.20 255.255.255.0
    Router#(Config-if)exit
    Router#(Config)ip default-gateway A.B.C.D (ip address of switch)
    end

    You could then telnet the router and then telnet the switch assuming you setup the router correctly. The ip address of the switch needs to be on the same network as the LAN interface for the router as well.

    Now if there is a way to telnet to the switch directly without first telnetting into the router I'd love to know but in my mind it just doesn't seem possible without a port forward.
    Reply With Quote Quote  

  18. Senior Member blackninja's Avatar
    Join Date
    Dec 2007
    Location
    UK
    Posts
    386

    Certifications
    CCNA Security, CCNP, MCSE (S2003) & LPIC-1
    #17
    Quote Originally Posted by bcall64 View Post
    Ok doing this from memory so forgive me if I miss something. My exam is Monday.

    First of all you need to configure your vty lines. So...

    Router#conf t
    Router#(Config)line vty 0 4
    Router#(Config-if)password password
    Router#(Config-if)login
    Router#(Config-if)transport input telnet
    Router#(Config-if)exit
    Router#(Config)int vlan 1
    Router#(Config-if)ip address 192.168.1.20 255.255.255.0
    Router#(Config-if)exit
    Router#(Config)ip default-gateway A.B.C.D (ip address of switch)
    end

    You could then telnet the router and then telnet the switch assuming you setup the router correctly. The ip address of the switch needs to be on the same network as the LAN interface for the router as well.

    Now if there is a way to telnet to the switch directly without first telnetting into the router I'd love to know but in my mind it just doesn't seem possible without a port forward.

    Port forwarding is a NAT thing.
    You can have a remote LAN without NAT.

    For example you could be on 10.0.0.1 /24 and telnetting into 10.0.10.1 /24. The telnet traffic may pass through 2 or 3 routers all using private addresses.
    Reply With Quote Quote  

  19. Senior Member bcall64's Avatar
    Join Date
    Dec 2009
    Location
    Morrisville, NC
    Posts
    156

    Certifications
    CCENT
    #18
    Of course I thought of that soon after I posted this. As long as all of the routing is setup correctly it should work just fine.
    Reply With Quote Quote  

  20. Digital Drifter
    Join Date
    Mar 2010
    Posts
    48
    #19
    Quote Originally Posted by bcall64 View Post
    Ok doing this from memory so forgive me if I miss something. My exam is Monday.

    First of all you need to configure your vty lines. So...

    Router#conf t
    Router#(Config)line vty 0 4
    Router#(Config-if)password password
    Router#(Config-if)login
    Router#(Config-if)transport input telnet
    Router#(Config-if)exit
    Router#(Config)int vlan 1
    Router#(Config-if)ip address 192.168.1.20 255.255.255.0
    Router#(Config-if)exit
    Router#(Config)ip default-gateway A.B.C.D (ip address of switch)
    end

    You could then telnet the router and then telnet the switch assuming you setup the router correctly. The ip address of the switch needs to be on the same network as the LAN interface for the router as well.

    Now if there is a way to telnet to the switch directly without first telnetting into the router I'd love to know but in my mind it just doesn't seem possible without a port forward.
    Hey thanks for answer but im still a bit confused....

    So I understand that I to pass throught the router fisrt before I can telnet to the switch

    So I need to enter this to the router: ip default-gateway A.B.C.D (ip address of switch)

    But how do I specify the IP address of the switch?

    is it also:

    router#conf t
    router(config)# ip default-gateway A.B.C.D

    Thanks a bunch
    Reply With Quote Quote  

  21. Senior Member bcall64's Avatar
    Join Date
    Dec 2009
    Location
    Morrisville, NC
    Posts
    156

    Certifications
    CCENT
    #20
    Quote Originally Posted by super22 View Post
    Hey thanks for answer but im still a bit confused....

    So I understand that I to pass throught the router fisrt before I can telnet to the switch

    So I need to enter this to the router: ip default-gateway A.B.C.D (ip address of switch)

    But how do I specify the IP address of the switch?

    is it also:

    router#conf t
    router(config)# ip default-gateway A.B.C.D


    Thanks a bunch
    I shouldn't do these things when I first wake up...

    I meant switch

    Switch#conf t
    Switch#(Config)line vty 0 4
    Switch#(Config-if)password password
    Switch#(Config-if)login
    Switch#(Config-if)transport input telnet
    Switch#(Config-if)exit
    Switch#(Config)int vlan 1
    Switch#(Config-if)ip address 192.168.1.20 255.255.255.0
    Switch#(Config-if)exit
    Switch#(Config)ip default-gateway A.B.C.D (ip address of switch)
    end
    Reply With Quote Quote  

  22. Cisco Moderator mikej412's Avatar
    Join Date
    May 2005
    Location
    Chicago
    Posts
    10,190

    Certifications
    CCNP CCIP CCSP CCVP CCDP CCDA CCNA CS-CIPSS CS-CIPTDS CS-CIPTOS CS-CIPCSS CS-CFWS CS-CVPNS CS-CISecS ISSP 4013 4011
    #21
    Quote Originally Posted by bcall64 View Post
    Switch#(Config)ip default-gateway A.B.C.D (ip address of switch)
    A.B.C.D should be the IP Address of a ROUTER on the same network as the Switch Administrative IP (that VLAN 1 IP Address)
    Reply With Quote Quote  

  23. Digital Drifter
    Join Date
    Mar 2010
    Posts
    48
    #22
    ah ok now I get it hehe thanks guys
    Reply With Quote Quote  

  24. Senior Member spartangtr's Avatar
    Join Date
    Sep 2007
    Posts
    111

    Certifications
    VCP5-DV, CCNA, Network+, A+, Bachelors in Telecommunications
    #23
    Quote Originally Posted by bcall64 View Post
    I shouldn't do these things when I first wake up...

    I meant switch

    Switch#conf t
    Switch#(Config)line vty 0 4
    Switch#(Config-if)password password
    Switch#(Config-if)login
    Switch#(Config-if)transport input telnet
    Switch#(Config-if)exit
    Switch#(Config)int vlan 1
    Switch#(Config-if)ip address 192.168.1.20 255.255.255.0
    Switch#(Config-if)exit
    Switch#(Config)ip default-gateway A.B.C.D (ip address of switch)
    end
    aaaaaaalmost.

    vlan 1 is always shutdown by default isn't it? Add in a no shut command on the VLAN int line.
    Reply With Quote Quote  

  25. Senior Member chmorin's Avatar
    Join Date
    Feb 2010
    Location
    Texas
    Posts
    1,443

    Certifications
    CCNP:Voice, CCNA:V(IIUC), CCNA, CCENT, Security +, Network +, A+,CIW
    #24
    Quote Originally Posted by spartangtr View Post
    aaaaaaalmost.

    vlan 1 is always shutdown by default isn't it? Add in a no shut command on the VLAN int line.
    It's late, and I don't feel like cross checking (I have been studying BSCI to much to remember switching VLAN's well).

    But.... I don't think you need to enable a VLAN. Once it is created, its created. Even if you don't use it.
    Reply With Quote Quote  

+ Reply to Thread

Social Networking & Bookmarks