Doubt in networklayer


 
Thread Tools Search this Thread
Special Forums IP Networking Doubt in networklayer
# 1  
Old 03-21-2014
Doubt in networklayer

Guys

just one doubt

How network layer adds destination IP address to its header , the transport protocol header does NOT contain anything about the IP address (or host name). So, from where does the layer 3 brings the destination IP address?
# 2  
Old 03-21-2014
Which layers are you talking about? Layer 3 definitely contains the IPs. They're not computed from other layers, they're given to it by the computer on transmission.

If the underlying link is Ethernet, and the traffic is restricted to the local subnet, layer 2 can communicate without layer 3's help, because it gets help from ARP instead to convert IP addresses into ethernet addresses (i.e. MAC address).
# 3  
Old 03-21-2014
Exactly , how IP layer getting the destination Ip address ..?
# 4  
Old 03-21-2014
It's given to it by the computer before it's even sent. If the computer doesn't know the IP's, it can't send it.
# 5  
Old 03-21-2014
can u be more specific , my understanding in TCP/IP layer is

1: Data---> Transport layer [App layer to transport layer]
2:TCPheader+ data --> Network layer [transport to network layer]

In third stage , IP header is attaching to data , and the IP address of destinaion is putting in to IP header

but my doubt in from where the network layer, is getting the destination address...?
# 6  
Old 03-22-2014
OK, a program is running and it was to open a TCP connect to, say, port 75 on the computer with an IP address of 1.2.3.4. So the program invokes a socket() system call to obtain a TCP socket. Then the program issues a connect() system call. Lots of important data is included in the call to connect() including the IP address and the port.

Because of the connect() system call the TCP code knows that it wants to connect to 1.2.3.4. So the TCP layer calls the IP layer to actually make the connection. How does the IP layer know that the desired destination address is 1.2.3.4? Because the TCP layer provides the IP layer this information. Now why is that mysterious?
This User Gave Thanks to Perderabo For This Post:
# 7  
Old 03-22-2014
great , now i am getting to it ..

but my understanding was , from transport to network layer , the only data that passing is TCPheader+data , and in this IP address is not available though.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Doubt

in my shell script requirement is to search and replace the file with variable so i use the following command sed -i "s/abc/$SCHEMA/g" table.sql later when the script runs sqlplus username/pwd@Table& this & is not letting the variable to replace the value inside the file .please let me know... (1 Reply)
Discussion started by: bhuvan1
1 Replies

2. Ubuntu

Doubt

hi ,, i am new for this.. i want to know abt linux os.. which version is best for it industry.. please suggest me..:cool: (1 Reply)
Discussion started by: c vignesh kumar
1 Replies

3. Red Hat

doubt

I need help in opening the .exe files in linux. As i have downloaded ubuntu os from trail version. after executing the the file name in terminal it is stating that get archive files for opening the .exe files. But i am unable to get it please help me (2 Replies)
Discussion started by: yashwanthguru
2 Replies

4. Shell Programming and Scripting

Doubt

Hi, I have a file with multiple entries and I have calculated the percentages. Now I want to know how many of my entries are there between 1-10% 11-20% and so on.. chr1_14401_14450 0.211954217888936 chr1_14451_14500 1.90758796100042 chr1_14501_14550 4.02713013988978... (1 Reply)
Discussion started by: Diya123
1 Replies

5. UNIX for Advanced & Expert Users

doubt in df -h

in my parition i hav parition like this Filesystem Size Used Avail Use% Mounted on /dev/sda2 24G 22G 756M 97% / /dev/sda5 248G 1.2G 234G 1% /else /dev/sda1 965M 24M 892M 3% /boot tmpfs 7.0G 0 7.0G 0%... (1 Reply)
Discussion started by: ponmuthu
1 Replies

6. UNIX for Dummies Questions & Answers

Doubt

How would i create virtual interface in linux to configure more than one IP address for a physical interface? any help wll be appreciated. (1 Reply)
Discussion started by: salil2012
1 Replies

7. Shell Programming and Scripting

One doubt

Hi, Can i use the shell script like this? When i am running the script it is hanging not giving me any output. I can redirect the output and then i can do the manipulations also but why this one is wrong. I am confused we can do like this or not.. #!/usr/bin/ksh for line in `top` do... (2 Replies)
Discussion started by: namishtiwari
2 Replies

8. UNIX for Dummies Questions & Answers

doubt on name

HI, Iam jus tin a confusion that solaris and unix are the same.if they are diffrent,how they are?pls give me a brief idea abt these two. I will be very grateful to you thanks (1 Reply)
Discussion started by: shruti_mgp
1 Replies
Login or Register to Ask a Question