netstat -r question

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions netstat -r question
# 1  
Old 05-10-2011
netstat -r question

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:
a. Enter “ping compserv1.cs.sunysb.edu”. Recall that ping is implemented using ICMP echo messages.
What would be the destination IP address of the IP packet that carries the echo request ICMP message?
Which entry in the routing table is used to forward this IP packet?
What are the next-hop IP address and the next hopinterface as the result of this look-up?


2. Relevant commands, code, scripts, algorithms:
This is what i get with netstat -r
Code:
[root@]# netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
130.245.30.0    *               255.255.255.0      U      0 0        0    eth0
169.254.0.0     *               255.255.0.0        U      0 0        0    eth0
default         130.245.30.1    0.0.0.0            UG     0 0        0    eth0
----------------------------------------------------------------------------------

this is what i get from typing "ping compserv1.cs.sunysb.edu"
(note that these are just portion of it. )

64 bytes from compserv1.cs.sunysb.edu (130.245.1.44): icmp_seq=227 ttl=254 time=1.24 ms
64 bytes from compserv1.cs.sunysb.edu (130.245.1.44): icmp_seq=228 ttl=254 time=1.29 ms
64 bytes from compserv1.cs.sunysb.edu (130.245.1.44): icmp_seq=229 ttl=254 time=1.43 ms
64 bytes from compserv1.cs.sunysb.edu (130.245.1.44): icmp_seq=230 ttl=254 time=1.31 ms



3. The attempts at a solution (include all code and scripts):

What would be the destination IP address of the IP packet that carries the echo request ICMP message?
A:I assume for this one it would be 130.245.1.44
Which entry in the routing table is used to forward this IP packet?
A: It is this one
"130.245.30.0 * 255.255.255.0 U 0 0 0 eth0"
What are the next-hop IP address and the next hopinterface as the result of this look-up?
A: this one I have no clue what its asking for.

4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Stony brook university, NY, USA. Professor Y, ISE 311

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
# 2  
Old 05-10-2011
First of all, you have but one interface. A packet can stay on the local machine or it can exit via eth0.

Since your netmask is 255.255.255.0, addresses like:
130.245.30.10
130.245.30.20
130.245.30.30
are on your local subnet. You can reach stuff like that directly. The packet goes out eth0 and the next hop is the destination. But you can't reach addresses that don't start out 130.245.30 directly. So you must send all other traffic to your default router which is 130.245.30.1. Your default router does start out with 130.245.30 so you can reach it directly. (You can also reach addresses which start out 169.254, which seems odd, but which has no bearing on this question. Is eth0 really right? Could there be a copying error? )

So whenever you want to reach anything that does not have an address starting with 130.245.30, just send it to the default router and let the router figure out what to do.

So the packet addressed to 130.245.1.44 will go out interface eth0 to the next hop which is 130.245.30.1.

Which entry in the routing table is used to forward this IP packet? Re-examine your answer to this question.
This User Gave Thanks to Perderabo For This Post:
# 3  
Old 05-13-2011
hey thanks for answering my question. Another question i have is on CIDR form for IP addresses.
so here is an question + the answers. But I just dnt understand it, if possible can you explain it to me?

An ISP has obtained a group of IP addresses, which can be represented in the CIDR form as 224.192.48.0/20. The ISP has rented this IP address space to three organizations A, B, and C in proportion 0.5:0.25:0.25 in terms of address space size. Give an allocation scheme of IP addresses among organizations A, B, and C in the CIDR form.
Answer:
224.192.48.0/20 in CIDR form is equivalent to (subnet mask: 255.255.240.0, subnet number: 224.192.48.0)
224.192.48.0/20 --> 1110 0000 . 1100 0000 . 00110000 . 0000 0000
1110 0000 . 1100 0000 . 00110000 . 0000 0000/22
1110 0000 . 1100 0000 . 00110100 . 0000 0000/22
1110 0000 . 1100 0000 . 00111000 . 0000 0000/22
1110 0000 . 1100 0000 . 00111100 . 0000 0000/22
Thus, the first two subnets out of the above four can be assigned to organization A, the other two to organizations B and C respectively.
A: 224.192.48.0/21 after address aggregation
B: 224.192.56.0/22
C: 224.192.60.0/22

so what if we change the three organizations A, B, and C in proportion 4:3:1. How will this be done?
# 4  
Old 05-14-2011
224.192.48.0/20 is in CIDR format. It's the equivalent to subnet 224.192.48.0 with a netmask of 255.255.240.0. A netmask is always a sequence of 1-bits's followed by a sequence of 0-bit's. The subnet mask 255.255.240.0 has 20 1-bit's. The notation 224.192.48.0/20 is so much more compact than "224.192.48.0 with a netmask of 255.255.240.0" that lots of us just use it all the time even on internal networks that don't involve CIDR.

To split a network 50-25-25 we need to crack it into 4 pieces. That way we can give 2 pieces to the one big guy and then the little guys get one piece each. Notice that 4 is a power of two. It's gotta be that way. If these 3 guys each wanted one third of the network we would be outta luck.

The guy with two pieces can fold them together (or aggregate) them. To do that he needed either the first two or the second two pieces. You can't just give him any random selection.

The 4 way split involved added two more 1-bits's to the subnet mask.

That 4-3-1 split you ask about happens to be possible. So it is probably an assignment. Smilie You will need to crack the network into 8 pieces to start. One guy will get 4 pieces, the next guy gets 3 pieces, and the last guy only gets one piece. The guy with 4 pieces can get all 4 folded back into a single CIDR spec. Not's not the case with the guy who gets 3 pieces. You can fold his first two back together, but then he a final separate piece. That's the way it has to be. The guy with one piece has nothing to fold.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

netstat

When running netstat -i from the Command Terminal, It returns with 21 different connections.. The addresses all look like this: ::1 fe80:1::1 10:dd:b1:a5:c4:ba with Network names like Linke#2 fe80::8e2d How can I delve deeper into this to clarify what is going on with my network?... (0 Replies)
Discussion started by: dwfiedler
0 Replies

2. Red Hat

netstat

Hi Can any body tell me about TIME_WAIT status meaning in the following command output. # netstat -anp|grep 5000 tcp 0 0 127.0.0.1:50006 0.0.0.0:* LISTEN 5058/ccsd tcp 0 0 0.0.0.0:50008 0.0.0.0:* ... (3 Replies)
Discussion started by: mastansaheb
3 Replies

3. UNIX for Advanced & Expert Users

Help with netstat

Hi, I want to list the time for how long a secure connections last to my server/blade. i am using netstat command to get the same, but not sure how to get the time for how long connections is being ESTABLISHED. netstat -na | grep 'ESTABLISHED' | grep :443 |awk '{print $4}' | cut -d: -f1 |... (1 Reply)
Discussion started by: Siddheshk
1 Replies

4. Solaris

netstat -- what am i looking at?

Greetings to all, Here is a line of output from my netstat command cbp031.904 wdcprodhome.nfsd 98304 0 49640 0 ESTABLISHED The only thing i recognize is the unix machine "cbp031" but what is .904 and all the other data telling me? Thanks in advance. (3 Replies)
Discussion started by: Harleyrci
3 Replies

5. BSD

question about netstat

For FreeBSD I use this command to determine what ports are listenning netstat -an | grep LISTEN is there another way, perhaps another command? (2 Replies)
Discussion started by: edgarvm
2 Replies

6. UNIX for Dummies Questions & Answers

netstat not working

Hello, One of the solaris machine in our network is giving an error when the netstat command is executed. soloman:/home/db2admin->netstat ip open: Permission denied can't open mib stream: Bad file number But it works with root. I couldnt' get any useful info during my search in google. ... (2 Replies)
Discussion started by: k_pranava
2 Replies

7. IP Networking

netstat

Hi what is the command to see the process name/application name along with the port number, connection status ... netstat is not giving process/application name Is there any way to know which application is holding which port? Thanks in advance (3 Replies)
Discussion started by: axes
3 Replies

8. UNIX for Dummies Questions & Answers

Netstat question

I'm sure this a simple networking question. I was performing a traceroute to a client of ours that connects to us over the internet. They were having problems connecting to us and I when I did the traceroute command it would stop at about 5 hops and give me 3 stars continously (* * *) What does... (1 Reply)
Discussion started by: eloquent99
1 Replies

9. IP Networking

TIME_WAIT in netstat

Why would I get TIME_WAIT when i netstat a port?? What would be some scenarios of this situation?? (1 Reply)
Discussion started by: eloquent99
1 Replies

10. IP Networking

Netstat

Giving netstat command on the prompt gives commands such as localhost.43592 localhost.35237 32768 0 32768 0 TIME_WAIT localhost.43594 localhost.43595 32768 0 32768 0 TIME_WAIT localhost.43598 localhost.35237 32768 0 32768 0 TIME_WAIT... (6 Replies)
Discussion started by: DPAI
6 Replies
Login or Register to Ask a Question