Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
5

Packet Tracer: How am I able to SSH and Telnet without a router on the network?

I'm using both protocols to log in to the switch and was wondering how I'm able to do so. I was under the impression that both require IP, which is layer 3. How are things working to get me to the switch from the PC that I cabled into it? I didn't think switches (unless layer 3) regarded IP addresses.

18 comments
78% Upvoted
This thread is archived
New comments cannot be posted and votes cannot be cast
level 1

Think you have the management IP confused with layer3 routing?

level 2
Original Poster1 point · 8 months ago

Perhaps, but I'm not sure how I am able to even connect through the management IP without a router to see the IP addresses I'm trying to move data to.

level 3
CCENT, ITILv37 points · 8 months ago

Managed switches use layer 3 for management. You can assign ips to the management address and don't need a router if they are on the same subnet

level 1
[deleted]
5 points · 8 months ago

Switches can create a virtual interface called an SVI (Switched Virtual Interface) sometimes called a VLAN Interface. This interface allows the Switch's control plane (It's Processor/CPU) to act like it has a virtual network cable plugged into the switch itself. In essence it allows the switch itself to be present on a VLAN or multiple VLANs. This interface is virtual in that you cannot see or touch it, but it can be assigned an IP like a normal port. This gives your switch an address in which you can login and manage it. Without this the CPU/Control plane passively control and manages switching by does not partake in having an interface in the VLAN (Network).

There are also BVIs (Bridged Virtual Interfaces) but adding them to this discussion just makes it more complex and loses the point.

HTH

level 2
Original Poster1 point · 8 months ago

Okay, and I did set up the VLAN interface. I'm still not sure how the PC can connect to it though, if there is no router for the IP address to point to it. I thought switches only looked at MAC addresses. So for IP to work on a network, I don't necessarily need a router?

level 3
CCNA R&S4 points · 8 months ago · edited 8 months ago

A router is needed to route between subnets. Any hosts on the same layer 2 network with IP addresses configured on the same network can communicate directly via IP.

In terms of handling traffic in transit, switches do look at just MAC addresses. However, that says nothing about them being able to have an IP address configured for traffic destined specifically to that switch, it just doesn't make forwarding decisions based on layer 3 headers*.

*More advanced switches (called layer 3 or multilayer switches) can use multiple VLAN interfaces (called SVIs or switched virtual interfaces) or routed ports to perform routing. From a logical standpoint, though, switching is a layer 2 operation and routing is a layer 3 operation.

level 4
Original Poster1 point · 8 months ago

Perfect, that right there helps a bunch and gets me much closer. So could you maybe help me get this last part: I do see how a switch finds the MAC addresses and then moves the packets in the right direction, but when using an IP address in the same subnet, how does the network know where to get the packet using the IP instead of the MAC address and allowing the switch to help?

level 5

ARP is your answer. It resolves the IP address to a MAC address that can then be accessed via layer 2.

level 6

To be pedantically precise, it's ARP for IPv4 and NDP for IPv6. But the underlying logic is the same. Host applies subnet mask to intended destination IP, sees that it's on the same subnet, so asks everybody on the subnet "if your IP address is so-and-so, tell me your MAC address." Anybody with that IP address (hopefully only one device) sends a reply saying "yeah, my MAC address is ..."

level 7

Precision is the only way. I appreciate the mentioning of NDP.

level 6

And stores it in its MAC address table.

level 5
[deleted]
1 point · 8 months ago

how does the network know where to get the packet using the IP instead of the MAC address and allowing the switch to help?

Could you rephrase this? Also check my answer above to see if that helps

level 5

To expand on my ARP reply and to complicate it further.

Every time a packet goes beyond a local segment, the IP Addresses do not change, but the MAC Addresses do. Imagine sending a packet to google.com To get to it's default gateway, it resolves the IP to a MAC and reaches the GW. But how does the GW get out to the internet? It looks at it's routing table for the next hop, and requests the MAC Address for that hop and changes the Frame (since Layer 2) destination from itself (where the PC sent it) to the next hop, and changes the source MAC from the PC to itself. It does not change the source/destination IP (ignoring NAT) as those have to remain the same in order for the return traffic to know where to go.

level 3
[deleted]
2 points · 8 months ago

Two hosts on the same subnet will still communicate with IP. Even though a Switch can only see up to Layer 2 (MAC Addresses) it just ignores that part of the frame (the DATA field of a Frame is the IP Packet) and forwards frames based on MAC Address.

In regards to our case with using VLAN interfaces, our switch will now be interested in inspecting the packet encapsulated in the DATA field (The IP Packet) because it's acting like a PC itself on the Network. It behaves the same and listens for broadcasts and ARP requests directed towards in MAC Address.

level 4
Original Poster1 point · 8 months ago

Okay, so end user devices (NIC cards) actually can read the layer three information. That makes sense, if I'm correct in saying that, and please correct me if I am wrong haha. Thanks man!

level 5
[deleted]
1 point · 8 months ago

The host itself deals with the Layer 3 (TCP/IP stack) but you can think of the host and the NIC as just one entity for simplicity sake that responds to requests for MAC addresses or IP Addresses that match those burned into the hardware or assigned to the interface

level 1

If you’re on the same subnet (192.168.1.0) with a subnet mask of 255.255.255.0. If you’re switch is 192.168.1.1 and you’re PC is anything between 192.168.1.2 - 192.168.1.254 you can directly talk to the switch without and routing necessary since you are on the same subnet.

When your pc sends a request to 192.168.1.1 it will hit the switch and the switch will have to make a decision to filter, flood, forward.

If there is a deny anywhere it will filter and drop the packet to the switch.

If it doesn’t know have a learned IP in its MAC address table, it will flood the packet to all the ports.

If it knows where to go based upon the MAC address in the MAC address table it will forward the packet. In this case since it knows it’s own MAC address it will forward all those packets to itself.

level 1
CCNA-Makes Phones Do Things1 point · 8 months ago

You can book two PCs together with appropriate cabling, assign IPs, and do IP between them with no router or switch.

The switch still passes data, but doesn’t look at the IP info, just the MAC info.

Management via Telnet or SSH is a sort of secondary thing: it’s not strictly required for a switch to do its job.

Community Details

33.9k

Subscribers

330

Online

Create Post
r/ccna Rules
1.
No posting of illegal materials
2.
No posting of braindumps
3.
Be courteous and helpful
4.
Don't ask others to complete your labs
Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.