Jump to content

Basic programming question & router question


555

Recommended Posts

First the routing question..

I have 2 routers, one which is half router and half cable modem provided by my ISP and one router which i use for my room to multi network to my xbox 360, pc, laptop, ect.. the one my ISP gave me starts with 192.168.1.1 and the belkin I have starts with 192.168.2.1 which ussually made it easy to set up because it did not conflict with my netgear router which also had a default of 192.168.1.1, how do you set them both up together if they have the same default ip? and also the belkin which started with the 192.168.2.1 instead of the 1.1 recently after the reset, now some pc's are showing that as the ip or connection when i do an ipconfig, and they are not even wired to that router.. and when i do a ipconfig /release or ipconfig /renew it said I do not have the priviledges to do that in Cmd. Does Vista require some kind of super user command first like Ubuntu? like Sudo Ipconfig /release? any help would be appriciated this is a mess..

2nd question reguarding programming..

In early math i was taught the sign < or > was like a pacman and pointed in the direction that went to the highest amount.. in programming is it different and set so > permenantly means greater then or < means perm lesser then? My text book makes it look like > is always greater then and < is always less then, or do most programming languages use the same logic i was taught in 4th grade and the pacman guy (< alwways eats the larger number or value?

thanks

Link to comment
Share on other sites

Just trying to get them to work..

I have 2 routers, one which is half router and half cable modem provided by my ISP and one router which i use for my room to multi network to my xbox 360, pc, laptop, ect.. the one my ISP gave me starts with 192.168.1.1 and the belkin I have starts with 192.168.2.1 which ussually made it easy to set up because it did not conflict with my netgear router which also had a default of 192.168.1.1, how do you set them both up together if they have the same default ip? and also the belkin which started with the 192.168.2.1 instead of the 1.1 recently after the reset, now some pc's are showing that as the ip or connection when i do an ipconfig, and they are not even wired to that router.. and when i do a ipconfig /release or ipconfig /renew it said I do not have the priviledges to do that in Cmd. Does Vista require some kind of super user command first like Ubuntu? like Sudo Ipconfig /release?

and I know what math symbols are, I dont think you read anything I typed. Can you please read it first before responding? thanks

Link to comment
Share on other sites

How are you 'trying to get them to work'? What do you want them to do? Are you trying to setup a 'trusted' and 'untrusted' segmented network? Do you just one one network with every thing on it?

x < y means x is less than y.

x > y means x is greater than y.

Pac man eats the larger value (because if you can only have one, why have the smallest one?).

Link to comment
Share on other sites

I have mine set-up to piggy back.

Internet side IP: *.*.*.*

Internet comes into the dsl router and gets a IP from the ISP. The router then assigns an ip of 192.168.1.1 to itself and assigns 192.168.1.2-200 to clients.

Internal network IP 192.168.1.1

DHCP IP pool 192.168.1.2 - 192.168.1.200

Network IP 192.168.1.2

Linksys router then grabs IP 192.168.1.2 from dsl and sets it's local network address to 192.168.2.1 and DHCP server 192.168.2.2-200 inside the next network.

Internal network IP 192.168.2.1

DHCP IP pool 192.168.2.2 - 192.168.2.200

Computers 192.168.1.2

My computers grab IPs from the Linksys router and surf the Internet and network.

Internal network IP 192.168.2.1

DHCP IP pool 192.168.2.2 - 192.168.2.200

I use this setup to attain the extra features from the linksys router instead of the cheap dsl modem. This is also the oversimplified version of my network. I have a few more routers and switches setup to Client Bridge using a DD-WRT firmware.

Link to comment
Share on other sites

I am pretty moronic when it comes to networking, i guess my router does not work properly anymore, because when i type in its default address 192.168.2.1 it does not goto the router, so what i would like to know i guess then is if both routers are default at 192.168.1.1 how do i set up the network, i just want to have the both routers accessable from my webbrowser to play with the settings, and extend my wifi, plus im curious as to why it showed on ipconfig on other computers on the network why my belkin router the 192.168.2.1 default was assigning ip addresses to the other computers when they were never even linked or wired or wifi or connected to that router at all except threw the main router/cable modem.

I remember last time i had to mess with my DHCP settings on the second router in my room but now cant even access it even after i reset it. Sparda thanks for explaining it further, this current college class im taking sucks and the book is confusing, thanks for clearing up the < and > signs compared to programming language < and > signs

Link to comment
Share on other sites

From what I understand you are using one of the routers as a second access point. The best way to do this is to disable the DHCP server on all but one of the routers (that one been the one that connects every thing to the internet) then connect each one through a port on the switch (not using the WAN ports). You also need to change the internal IP address of any that have the same IP address as the router that connects every thing to the internet (if you don't, things will go wrong). Preferably also change the subnet of the one that is in a different subnet although leaving that as it is won't hurt any thing, you just won't be able to access it's web configuration page unless you move a computer in to that subnet or configure your network adapter with a second subnet.

Link to comment
Share on other sites

Thanks Sparda, so how would you recommend configuring routers of the same default IP? disconnect it from the main router which is also the same ip then connect and config? Is it possible to disable DHCP and use the 2nd router also as an extended WIFI which would have the same SSID as the main router?

Link to comment
Share on other sites

Disconnect your 2nd router from the 1st. Unplug your computer from the 1st router (wired or wireless). Connect the 2nd router and the disconnected computer via ethernet cable. Configure the 2nd router as needed ie: disable DHCP, change local router IP to say 192.168.1.2, etc. Once settings are applied reconnect the computer and second router to the 1st. Your may need to adjust the DHCP server IP pool on the first router. That way the 1st router does not hand out the duplicate 192.168.1.2 address, or change the 2nd router ip to something outside of the IP pool.

Thanks Sparda, so how would you recommend configuring routers of the same default IP? disconnect it from the main router which is also the same ip then connect and config? Is it possible to disable DHCP and use the 2nd router also as an extended WIFI which would have the same SSID as the main router?
Link to comment
Share on other sites

mmm... I dunno Sparda. Some of those routers won't pass through the IP addresses when you turn off the DHCP server sometimes...

Here is what I think you need to do though.... Get DD-WRT, and there is a great article somewhere (cant remember where if I find it I will post it) on using the inside network routers for DHCP pass through service. This way, you can still get into them and they will function properly, but they will not have to read the full header packet to retransmit. Think of it as putting it in layer 2 mode (if you dont know what that is, it's basically switch mode instead of router) without actually looking the IP address for the router itself. But I'll be honest with you, whatever you do make sure you put the IP of the router within the IP block before you do whats on that article (ie. if your main router has an IP of 192.168.1.1 with a [most probably] netmask of 255.255.255.0, then make sure that the routers are statically assigned IP addresses and netmasks of 192.168.1.254 and 192.168.1.253 /24 (or rather the /24 means 255.255.255.0) respectively.... I am not good this time around of explaining it....

Ahh! It's called Wireless Bridge Mode...

go here: this is the shiz you need: Wireless Bridge - DD-WRT WiKi

***BTW, if you wanna know about how the whole subnetting thing comes into play you MAY (or may not dunno) wanna read this***

Repost from a while ago...... *by hexskrew :D*

HAHAHA! Took me 3 weeks to get subnetting down.
It's easier (WAY EASIER!) when someone can explain it in terms you can understand.

Everyone has their method, and this is mine:

Network address x.x.x.x (an example 192.168.0.0)

let's say you need a subnet for 40 computers

2^n - 2 = x will give you as close to 40 usable addresses as needed.

&lt;btw 4 anybody who does not know ^ = the power of so 2^4 for ex. would be 2 to the power of 4&gt;
remember it's in 2's!

so it can only be (starting with ^1) 2,4,8,16,32,64,128,256,512,1024,2048,4096.
If you need over 4096, then get a calc, or just keep multiplying by 2.

2^1=2-2=0 &lt;-do not do this, unless you just wanna be an asshat... it achieves NOTHING!
2^2=4-2=2 (best for router to router)
2^3=8-2=6
2^4=16-2=14
2^5=32-2=30
2^6=64-2=62 This is the formula that gives us at least 40 usable ip addresses.

Take the 6 (since it is 2^6) and subtract from 32
32-6 = 26 &lt;-this number tells us how many bits we have for the subnet.

think if it from here as a table.
______________________________________________________________
|1|1|1|1|1|1|1|1| . |1|1|1|1|1|1|1|1| . |1|1|1|1|1|1|1|1| . |1|1|0|0|0|0|0|0 &lt; starting from the left you put how ______________________________________________________________many bits (1's) we get from the
equation.
Ea. group of 8 bits forms the # (or octet) 255 starting from left to right,
so from this we know we have:
255.255.255.x &lt;- with x being what we have left to calculate for the subnet address.

now we need to convert those two bits into the end of the subnet. So let's but it up against what ea. # means.
_____________________________
| 1    |  1 |  0  |  0  | 0 | 0 | 0 | 0 |
_____________________________
|128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
_____________________________
x x
now lets add what we have

128+64=192

Our full subnet mask = 255.255.255.192

To find the Broadcast address, since we got 64 total addresses (with 62 usable),simply use this formula
192.168.0.x

x = x + 64 - 1 (because we count from 0, NOT 1!!!)
x = 0 + 64 - 1 = 63

so our broadcast address is 192.168.0.63
Since the broadcast address is the LAST address that is in the network (ALWAYS THE LAST ADDRESS) we can conclude that the last usable address in the network is:
192.168.0.62 (the first address is ALWAYS the Network Address and is not usable. Just forget about it)

To finalize our subnet here is what we have:

Network address - 192.168.0.0
First Usable address - 192.168.0.1
Last Usable address - 192.168.0.62
Broadcast address - 192.168.0.63

And remember kids! the number of ea. octet only goes to 255, so if say you need over 255 ip addresses you simply increment ea. 255 addresses as +1 to the next octet (2nd from right in this ex.)
i.e. 192.168.0.200 + 64 total addresses = 192.168.1.9 = broadcast address.

Link to comment
Share on other sites

Thanks Sparda, so how would you recommend configuring routers of the same default IP? disconnect it from the main router which is also the same ip then connect and config? Is it possible to disable DHCP and use the 2nd router also as an extended WIFI which would have the same SSID as the main router?

Aye... I agree with Sparda in what he says makes the most sense. That is unless you actually have a reason to stack the routers. Personally, it can/will likely cause more issues than it would solve especially if you are trying to share files between two ranges.

The simplest way (& only way if the two routers are of the same default IP range, have been reset, & assuming they are both in fact uplinked to eachother and not acting as a pair of stacked routers) to reconfigure router B would be to just connect it directly to a laptop and manage it by itself.

(The following assumes that the two routers are currently on different networks (ie. one behind another)).

However, if you can't or don't want to you could always...

1) Set your local system (connected via LAN to Router B) with a static IP that was on Router B's network.

2) Log in to Router B.

A) Disable DHCP (Router will likely want to save and possibly reboot)

a) If you had to reboot wait for it to come back up and reconnect

B) Reassign Router B's static IP address to an unused IP in the range of Router A (Save & Reboot router)

3) Change the Static IP on your local system back to DHCP

4) If you connected a LAN port on Router A to a LAN port on Router B everything should now be working fine.

Essentially, here you are using Router B as an uplinked hub.

As for using Router B as, "an extended wifi which would have the same SSID as the main router?" This is actually very simple to accomplish. In this scenario you are wanting to roam between AP's ( wireless Access Points.)

1) Set the SSID on Router A & B to the same name.

2) Make sure both A & B have the same encryption type and password

3) Set Router A & B on DIFFERENT channels (1, 6, or 11 ideally)

4) You should now be able to roam between the two AP's

Link to comment
Share on other sites

ahhh I see.. thanks everyone for the help, I will have to re-read the subnetting piece later when I can absorb all of it and throughly read through it, I have a quiz due today for my intro to software development class :) very good info though, i have not heard about wireless bridging until now

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...