Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to find out the port number of my computer to which my ISP actually connects & provides the internet service, given my ADSL modem is operating in Bridge Mode instead of PPPoE. I want to find out others users' port numbers, but I thought first I'd find out my own.

I'm on a windows machine, so I used the command netstat -a -b -n but could not figure out the port id. I suppose if there IS such a port number, there must be some sort of internal port forwarding being done. So then how do I find out my port id?

Edit: Basically my question is, How does the ISP send data packets to a computer..I ask this since I had figured out a way to impersonate someone using his MAC address and session id (my ISP is BSNL). So there could also be a way of hijacking someone's connection & breaking into his system. That depends a lot on how ISPs actually send data to different clients.

share|improve this question

migrated from Aug 30 '11 at 21:00

This question came from our site for information security professionals.

@Jeff: hope the edit makes the question clearer – Rushil Aug 30 '11 at 20:43
Close reason (migrate to SU/SF) still stands I think, unless you want to actually turn this question into one about spoofing or MITMing your neighbor. Then we may be wandering into black hat territory, which is also off-topic. – Iszi Aug 30 '11 at 20:46
@lszi: I'm learning network communications, so it completely pertains to exploring how things work..nothing malicious :-) – Rushil Aug 30 '11 at 20:50
Interesting question. I wonder how this would pertain to the "walled garden" internet communities (like AOL) of the past. – tombull89 Aug 30 '11 at 21:09
See cross-post:… – Shane Madden Aug 30 '11 at 21:48
up vote 3 down vote accepted

Your ISP doesn't "connect" to your computer. Your ISP routes IP packets to your router which then forwards those packets onto the LAN segment to which your computer is connected. IP packet delivery is based only on IP-address. The internet protocol layer does not use port numbers.

There are two main transport layer protocols above IP, these are TCP, which is connection oriented, and UDP which is not. So notions of connections only apply to TCP. TCP connections are, with few exceptions, always initiated by your computer, not by the server and mostly are connections to servers other than your ISP's servers (especially if we disregard DNS).

Both TCP and UDP use port numbers to distinguish between concurrent connections from the same client and to locate services on servers. Your PC does not have a single port number, it has one for each open TCP connection. client port numbers are (nowadays) assigned randomly.

If your question is about ADSL, this article and this RFC might be relevant.

share|improve this answer
Thanks! this cleared my misconception..n I suppose, when the client computer wants to authenticate to the ISP, it does that in the PPP, PPPoE using CHAP..where again ports aren't relevant at all. – Rushil Aug 31 '11 at 21:05

You computer does not use a logical port to connect to your ISP. With your router operating in bridge mode, packets are passed directly with no encapsulation. Your router may still be working as a NAT device, but that doesn't relate to TCP/UDP port numbers as used on your computer.

share|improve this answer
I agree, computers don't use ports to connect to ISPs..But then, how exactly does my router receive (from ISP) and forward (to my computer) data packets when it operates in bridge mode? or could you just give me any reference where I could study this in more detail..? – Rushil Aug 30 '11 at 20:48
@Rushil - in bridge mode, all it does is retransmit bit for bit on what end what it received on the other. – Joel Coehoorn Aug 30 '11 at 21:17

Ports are what applications use as a layer to communicate multiple programs over one link, what you are looking for are IP addresses. I am guessing "Bridge mode" means you are using the ISP's DHCP server. so do a ipconfig to find out what IP your ISP gave you. Then your neighbors will likely be people within the same "Subnet" as you (If your netmask is, you would use the first two numbers of your IP and the other two could be any number between 0 and 255.)

share|improve this answer
I guess you didn't get my question (you were right abt the ISP DHCP part though)..and I need to find out the specific port number which receives the data from my ISP's server, since ports are nothing but logical gateways. n finding out IP addr is too easy :-) my question is different.. – Rushil Aug 30 '11 at 20:15
I guess the answer would be "Whatever port you ask for" as it must provide data on whatever port you ask it for, otherwise the internet would not work. (unless it is doing some kind of firewalling which is very possible) – Scott Chamberlain Aug 30 '11 at 20:29
@Rushil - 1.) This question more appropriately belongs (if anywhere) on SU/SF, as it is not a security-specific concern. Please request for it to be migrated. 2.) Scott has it right - ports just don't work the way you seem to think they do. – Iszi Aug 30 '11 at 20:34

Your connection does indeed have a port, but it isn't quite what you are expecting I'm sure and it is not something that you are going to get out of your ISP. An ADSL connection is established between a modem and a DSLAM. The modem syncs up with a port on the the DSLAM. This is typically indicated in a CO by Floor, Relay Rack Row, Relay Rack Number, Shelf, Slot, Port. This will look something like RR01. This however is not your circuit ID. Your circuit ID is another portion of the connection, it is typically what identifies your circuit between the MDF and the NID. This number varies greatly from ISP to ISP (and there will be more than one if you are going through a CLEC and not an ILEC as each will have their own system).

The topography of an ADSL connection is long and complex, but mostly it is a single pair that follows from the ATM all the way to your house through a series of cross-connects where it eventually hits your modem. The DSLAM syncs with the modem, the ATM provides layer 2 and at some point hits the ISP edge router which controls the IP range and routing for that region.

Your IP is handed out by the edge router - it is assigned to your circuit based on the rules your ISP has set up (DHCP, static, etc). With a bridged modem, your MAC is typically arped by the edge router, but this isn't necessarily what determines your IP - this varies greatly from ISP to ISP.

DSLAM - Digital Subscriber Line Access Multiplexer - these maintain sync and control circuit speed and perform a number of other functions necessary for DSL to work
CO - Central Office - centralized point for a city or city region where communications are connected - all COs are interconnected in various patterns, dependent on location/ILEC)
MDF - Main Distribution Frame - this is where blocks from equipment in the CO and houses from the street meet and are cross-connected between - all the services in a CO eventually hit here
NID - this is the demarcation point between the ILEC and your home wiring
CLEC - Competitive Local Exchange Carrier - not the phone company, like Covad, XO, Sprint, etc
ILEC - Incumbent Local Exchange Carrier - typically the phone company, like AT&T, Verizon, Qwest/Century-Link, etc
ATM - Asynchronous Transfer Mode Switch - these are the muscle behind the Internet

share|improve this answer
For the un-initiated, could we get some clarification of the TLAs & FLAs in here? Most of them are fairly common knowledge (ISP, DHCP, MAC, etc) but some of the others are on a slightly more advanced level. – Iszi Aug 31 '11 at 17:42
@Iszi, updated with glossary and Wikipedia links – MaQleod Aug 31 '11 at 18:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .