Gentoo Archives: gentoo-user

From: Dan Farrell <dan@×××××××××.cx>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT again..] Technical networking question about changing GW
Date: Tue, 12 Feb 2008 01:40:49
Message-Id: 20080211194046.1dd35135@pascal.spore.ath.cx
In Reply to: [gentoo-user] [OT again..] Technical networking question about changing GW by reader@newsguy.com
1 On Mon, 11 Feb 2008 11:28:16 -0600
2 reader@×××××××.com wrote:
3
4 > I happen to be in a situation where I have both a DSL and CABLE
5 > connection to internet up for the time being... (Until the DSL
6 > contract month runs out).
7 >
8 > It affords a nifty opportunity to do some experiments. Of course I
9 > tested the speeds of both and it varies between 200 and 500 % faster
10 > on the Cable connection. (Nice).
11
12 Neat. You should set up advanced routing so you can use both at once.
13
14 > At first I used single machines connected independently to the
15 > respective IPs for testing, but it slowly dawned on me that I could
16 > hook everything up on the lan, to the same subnet and then just reset
17 > the GateWay target on individual machines as needed, for any of 6
18 > machines.
19 >
20 > So currently I have two internet outlets and two gateway routers on
21 > 192.168.0.0/24
22
23 Good job! Many wouldn't have caught that possibility, I bet.
24
25 > Here's the technical part:
26 > Assume I have loaded a web page that downloads a video to my cache as
27 > it plays. Assume further there are several of these to be played one
28 > by one.
29 >
30 > After playing one, if I reset my GW (and I have also rest
31 > /etc/resolv.conf to use that gw address for dns [probably not totally
32 > necessary]).
33
34 Right; you could use either to resolve.
35
36 > Followed by /etc/init.d/net.eth0 restart.
37
38 You may not even need to do that. I think old ips should work OK with
39 a reset router.
40
41 > Will the browser, which has not been restarted, now use the new
42 > gateway when I run the next link (or for testing, run the same link
43 > again), or will it continue on the same route (which is still
44 > available), that is, will the browser (firefox) continue using the
45 > original GW until the browser itself is restarted?
46
47 AFAIK the browser is effectively 'stateless'. It shouldn't need to be
48 restarted for it's behavior to reflect changes to route, ifconfig, or
49 resolv.conf.
50
51 > I know I could track all this with tcpdump but it gets sort of
52 > cumbersome unless you've memorized the necessary commands to filter
53 > output down to something more usable. I usually get so tangled up
54 > with tcpdump I spend more time on it than the project at hand. I
55 > don't use it very frequently so inevitably spend gobs of time at
56 > `man tcpdump' instead of tending to what I started to do.
57
58 Yeah, it's confusing. I usually use one of a few incantations:
59
60 # tcpdump -i eth0 port not 22
61
62 that dumps packets on interface eth0 that arent to port 22 (which I
63 was using to connect to the server, and gets messy real fast, as
64 tcpdump itself will be sending over port 22, hence a never-ending cycle
65 of tcpdump reporting its own traffic)
66
67
68 or perhaps something like:
69
70 # tcpdump -i eth0 port 80
71
72 that dumps all connections with port 80 on either side.
73
74 Finally, for you, something like
75
76 # tcpdump
77
78 will dump everything. You can then ctrl-C and look through the output
79 (shift-pageUp/Dn if you have scrollback buffer in the kernel)
80
81
82 > Why I ask is that the site I'm doing this on requires me to login and
83 > then relocate the stuff I want to see if I have to restart the
84 > browser.
85
86 No, I do this stuff all the time (to set up vpn from coffeeshops and
87 the like) and I don't ever restart my browser.
88
89 > I wanted to try to gauge if there was much of a noticeable difference
90 > with the two IP connections. And it would be handy to just step
91 > through the links changine the GW intermittently.
92
93 Yes, you can do that, but if you put a linux box between the gateways
94 and the network you can use both at once.
95
96 --
97 gentoo-user@l.g.o mailing list

Replies