I am confused on how requests to websites are received. If I type in 172.217.5.110 to my browser, google.com sends me its home page. I didn't have to specify the port number. How does that work? I read that commands such as ping use ICMP, which does not use port numbers, so I thought maybe that's why. However, I also read that one of the first steps of sending data using HTTP is to establish a TCP connection, which requires a port number. How does the web server listen for requests sent to its IP without a specified port number?
Web Access – How Websites Are Accessed Without Port Numbers
iproutingtcp
Related Solutions
Case of RREP: When nodes receive RREQ (Route request) for a destination node, then two types of nodes can respond to it. One is the destination node itself -- in this case, it can increase the seqeunce ID. The second types of nodes are those that have an existing route to the destination node. Now, they have already saved the seq number that was generated by the destination node, when they received the route. When sending a RREP, these intermediate nodes simply copy the earlier learnt sequence number (and do not generate a new one). This way, if the destination were to send a new route, then the node that generated RREQ, when it receives the RREP, it can pick the one with the latest sequence number and ignore the ones that are stale.
Here is what the RFC says about the destination node sending RREP:
If the generating node is the destination itself, it MUST increment its own sequence number by one if the sequence number in the RREQ packet is equal to that incremented value.
Case of RREQ: Nodes also maintain reverse routes (let us say, for node X) and they would want to update the route to originator of RREQ (node X) only when they receive a new RREQ from node X. One way to do this is to let X increment the sequence number whenever it sends a RREQ.
A note on destination sequence number field in the RREQ: As per section 5.1, when originating RREQ: "Destination Sequence Number: The latest sequence number received in the past by the originator for any route towards the destination.". As per section 6.5, when processing RREQ: "Lastly, the Destination Sequene number for the requested dest is set to the maximum of the corresponding value received in the RREQ message, and the destination sequence value currently maintained by the node for the requested destination."
So, basically, settting/updating Dest Seq Number means that the sender or forwarder of RREQ is indicating that I have the information till, let us say seq 101, that was sent by the destination node. If that is not the latest, then the destination node does not bother to increase its own sequence number before sending the RREP (section 6.6.1).
Your question is really too broad, and home networking and consumer-grade devices are explicitly off-topic here, but I will try to give you some general answers.
- PPP is a layer-2 protocol, the same way that ethernet, HDLC, frame relay, ATM, etc. are. PPP is specifically a point-to-point protocol with only two endpoints. Other protocols, e.g. ethernet, are designed to work with multiple possible endpoints. Because ethernet, and other IEEE LAN protocols can have multiple connection, they use MAC addresses, but PPP doesn't.
- I don't really understand your second question. PPP is a layer-2 protocol, but IP is a layer-3 protocol. In general, layer-2 protocols don't care about layer-3, and they can carry any number of layer-3 protocols.
- Ethernet is both a layer-1 and a layer-2 protocol. PPPoE uses PPP for the layer-2 protocol on an ethernet layer-1. The PPP frames are encapsulated in ethernet frames. As far as your traffic is concerned, it is passing through an interface that uses PPP as the layer-2 protocol. PPP can be used on multiple different layer-1 interfaces, e.g. serial, ATM, etc. PPP adds some feature that allow you to negotiate layer-3 addressing, data compression, authentication, etc. that do not exist in other layer-2 protocols.
- Your fourth question doesn't really make much sense. You seem to be comparing apples to oranges. PPP is a layer-2 protocol, but PPTP basically allows you to extend a LAN on top of other protocols. As you wrote, it is above layer-4, and the layer-2 protocol used when using PPTP could be PPP. Unfortunately protocols above layer-4 are explicitly off-topic here.
- PPP frames are not wrapped in IP packets. It is the other way around; IP packets can be wrapped in PPP (or other layer-2 protocol) frames. Neither layer-2 nor layer-3 know anything about ports, which are layer-4 addresses for some layer-4 protocols. Routers strip off layer-2 frames from the layer-3 packets, so the router on the other end of the PPP link will strip off the PPP frame. A router will then route the layer-3 packet, and it will create a new frame for the new interface for the packet. By the time the packet gets to a server, the PPP frame will be long gone. The server will have a network stack through which the frame it receives passes. When it gets to TCP at layer-4, then it will have the port used, and it will know to which process in the server it should send the TCP segment.
Best Answer
Ports are still involved even if you don't explicitly give them. It is an inherent property of the TCP and UDP protocols that you need port numbers.
If you don't give an explicit port number in the URL the browser uses default port numbers: 80 for
http://
andws://
, 443 forhttps://
andwss://
, 21 forftp://
.In other cases there are fixed port numbers, i.e. the mail server is always at port 25 and the DNS MX record only returns the name but not the port. For other situations (like SIP) there are DNS SRV records which also provide information about the port to use etc.
It doesn't. For typical web servers like nginx or apache one still has to specify the port number to use in the servers configuration. Others might use default port numbers.