Default Gateway packet tracer switch

bcall64bcall64 Member Posts: 156
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

Comments

  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    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.
    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
    
    :mike: Cisco Certifications -- Collect the Entire Set!
  • bcall64bcall64 Member Posts: 156
    mikej412 wrote: »
    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.
    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)
  • Bl8ckr0uterBl8ckr0uter Inactive Imported Users Posts: 5,031 ■■■■■■■■□□
    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)#
  • hexemhexem Member Posts: 177
    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.
    ICND1 - Passed 25/01/10
    ICND2 - Passed 9/03/10

    Studying CCNA:S
  • bcall64bcall64 Member Posts: 156
    knwminus wrote: »
    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. :)
  • bcall64bcall64 Member Posts: 156
    hexem wrote: »
    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!
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    bcall64 wrote: »
    That would explain why the command is not there.
    Actually, it doesn't....

    Here's a REAL 3550 switch
    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.
    :mike: Cisco Certifications -- Collect the Entire Set!
  • hexemhexem Member Posts: 177
    my bad ;) as far as simulation goes for switche's, it would seem nothing will beat real hardware anyway.
    ICND1 - Passed 25/01/10
    ICND2 - Passed 9/03/10

    Studying CCNA:S
  • bcall64bcall64 Member Posts: 156
    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.
  • hexemhexem Member Posts: 177
    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.
    ICND1 - Passed 25/01/10
    ICND2 - Passed 9/03/10

    Studying CCNA:S
  • bcall64bcall64 Member Posts: 156
    hexem wrote: »
    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.
  • bcall64bcall64 Member Posts: 156
    bcall64 wrote: »
    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.
  • thenjdukethenjduke Member Posts: 894 ■■■■□□□□□□
    I went the route of hardware as well.
    CCNA, MCP, MCSA, MCSE, MCDST, MCITP Enterprise Administrator, Working towards Networking BS. CCNP is Next.
  • super22super22 Member Posts: 48 ■■□□□□□□□□
    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?
  • bcall64bcall64 Member Posts: 156
    super22 wrote: »
    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.
  • blackninjablackninja Member Posts: 385
    bcall64 wrote: »
    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.
    Currently studying:
    CCIE R&S - using INE workbooks & videos

    Currently reading:
    Everything. Twice ;)
  • bcall64bcall64 Member Posts: 156
    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.
  • super22super22 Member Posts: 48 ■■□□□□□□□□
    bcall64 wrote: »
    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 bunchicon_wink.gif
  • bcall64bcall64 Member Posts: 156
    super22 wrote: »
    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 bunchicon_wink.gif

    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
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    bcall64 wrote: »
    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)
    :mike: Cisco Certifications -- Collect the Entire Set!
  • super22super22 Member Posts: 48 ■■□□□□□□□□
    ah ok now I get it hehe thanks guys:D
  • spartangtrspartangtr Member Posts: 111
    bcall64 wrote: »
    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.
  • chmorinchmorin Member Posts: 1,446 ■■■■■□□□□□
    spartangtr wrote: »
    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.
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
Sign In or Register to comment.