Default Gateway packet tracer switch
bcall64
Member Posts: 156
in CCNA & CCENT
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
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
-
mikej412 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! -
bcall64 Member Posts: 156If 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) -
Bl8ckr0uter 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)# -
hexem Member Posts: 177It'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 -
bcall64 Member Posts: 156What 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. -
bcall64 Member Posts: 156It'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! -
mikej412 Member Posts: 10,086 ■■■■■■■■■■That would explain why the command is not there.
Here's a REAL 3550 switchS3550-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! -
hexem Member Posts: 177my 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 -
bcall64 Member Posts: 156I 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.
-
hexem Member Posts: 177as 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 -
bcall64 Member Posts: 156as 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. -
bcall64 Member Posts: 156Yeah 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. -
thenjduke 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.
-
super22 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? -
bcall64 Member Posts: 156hey 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. -
blackninja Member Posts: 385Ok 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 -
bcall64 Member Posts: 156Of 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.
-
super22 Member Posts: 48 ■■□□□□□□□□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 -
bcall64 Member Posts: 156Hey 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 -
mikej412 Member Posts: 10,086 ■■■■■■■■■■Switch#(Config)ip default-gateway A.B.C.D (ip address of switch):mike: Cisco Certifications -- Collect the Entire Set!
-
spartangtr Member Posts: 111I 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. -
chmorin 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 PursuingWGU (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.