Showing posts with label Networking. Show all posts
Showing posts with label Networking. Show all posts

2012-08-17

tcpdump: output to pcap file and display on console

Many thanks for this blog entry where it explained on how to use tcpdump to write to a file and simultanously print on the console.

tcpdump -U -w - host 1.2.3.4 | tee file.pcap | tcpdump -r -

http://jbits.se/blog/2010/02/19/tcpdump-output-to-file-and-console/

2012-05-21

Networking: View PMTUD cache on linux

ip route show cache

ip route show cache <ip>

Wireshark shows packets larger than MTU

TCP segment of a reassembled PDU

wireshark shows a frame with 2574 Bytes,
tcpdump shows the same frame as 2574 Bytes

A very good post:
http://sandilands.info/sgordon/segmentation-offloading-with-wireshark-and-ethtool

and you are sure that the MTU is 1500 or lower (no jumbo frames), since you saw the MSS in the SYN and SYN/ACK, so both sides are certainly below 1500.

Apparently this is because of the NIC doing tcp segmentation offloading:


 # ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp-segmentation-offload: on
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: off
large-receive-offload: on

ethtool -K eth0 tso off
ethtool -K eth0 gso off

I turned off tcp first but the generic did prevail so I turned off gso and thought I saw only smaller packages but when enabling and disabling it again I did not see the small packets anymore, so maybe a restart is necessary.

Would be nice to see it working or not the 2nd time you disable it. But I won't restart the system.



2012-05-04

linux: ubuntu: map c drive from a windows machine over the network

Start Nautilus, i.e. click on the home folder icon.

Press CTRL-L (for location) and enter smb://<ip or name>/share, e.g. smb://10.0.0.1/c$

It will then ask for domain, username and password

2012-05-03

linux: multiple default gateways (even for aliases)

A really great blog entry, which solved all my issues in no time. The only thing is now that I have multiple distributions and have to find out where to place the commands so that after a reboot it will come back correctly.

http://kindlund.wordpress.com/2007/11/19/configuring-multiple-default-routes-in-linux/

linux: alias

ifconfig eth0:0 10.0.0.2 netmask 255.255.255.0 up

ifconfig eth0:0 10.0.0.2 netmask 255.255.255.0 down