Networking Problem

akilaperera2014

Well-known member
  • Jan 26, 2015
    1,169
    406
    83
    Kadawatha


    අපි හිතමු අපේ LAN එකේ PC දෙකක chrome run වෙනවා කියලා. දැන් මේ දෙකම Internet එකට සම්බන්ද වෙනකොට NAT වලින් Source IP, Dynamic Port -> Router's Public IP, Well known Port වලට හරවනවා.

    මේ PC දෙකේම Chrom run වෙන නිසා NAT වලින් Source IP එක Router's Public IP වලට හරවනවා. එතකොට LAN එකේදී assign වුණ port එක Well known Port(0-1023) එකක් බවට හරවද්දී ඒ PC දෙකටම assign වෙන්නේ Port 80 ද ?

    එතකොට එකම Public IP එකක් සහ එකම Ports තියෙද්දී මේ PC දෙක Internet එකේදී වෙන වෙනම අදුනගන්නේ කොහොමද ?

    :baffled: :baffled:

     
    • Like
    Reactions: imhotep

    araki

    Well-known member
  • Jun 8, 2011
    3,787
    2,563
    113
    dxb
    destination port same (eg port 80)

    source port different ( that's how it takes revers packet to correct PC in the LAN)



    eg: one PC open 2 browsers:


    ports-for-outgoing-traffic.jpg



    අපි හිතමු අපේ LAN එකේ PC දෙකක chrome run වෙනවා කියලා. දැන් මේ දෙකම Internet එකට සම්බන්ද වෙනකොට NAT වලින් Source IP, Dynamic Port -> Router's Public IP, Well known Port වලට හරවනවා.

    මේ PC දෙකේම Chrom run වෙන නිසා NAT වලින් Source IP එක Router's Public IP වලට හරවනවා. එතකොට LAN එකේදී assign වුණ port එක Well known Port(0-1023) එකක් බවට හරවද්දී ඒ PC දෙකටම assign වෙන්නේ Port 80 ද ?

    එතකොට එකම Public IP එකක් සහ එකම Ports තියෙද්දී මේ PC දෙක Internet එකේදී වෙන වෙනම අදුනගන්නේ කොහොමද ?

    :baffled: :baffled:

     

    TUX_VIM

    Active member
  • Aug 26, 2018
    286
    57
    28
    Colombo


    අපි හිතමු අපේ LAN එකේ PC දෙකක chrome run වෙනවා කියලා. දැන් මේ දෙකම Internet එකට සම්බන්ද වෙනකොට NAT වලින් Source IP, Dynamic Port -> Router's Public IP, Well known Port වලට හරවනවා.

    මේ PC දෙකේම Chrom run වෙන නිසා NAT වලින් Source IP එක Router's Public IP වලට හරවනවා. එතකොට LAN එකේදී assign වුණ port එක Well known Port(0-1023) එකක් බවට හරවද්දී ඒ PC දෙකටම assign වෙන්නේ Port 80 ද ?

    එතකොට එකම Public IP එකක් සහ එකම Ports තියෙද්දී මේ PC දෙක Internet එකේදී වෙන වෙනම අදුනගන්නේ කොහොමද ?

    :baffled: :baffled:


    Source port eka wenas nisa awulk yanne na
     

    Splash_smart

    Well-known member
  • Jan 26, 2016
    920
    508
    93
    මේ PC දෙකේම Chrom run වෙන නිසා NAT වලින් Source IP එක Router's Public IP වලට හරවනවා. එතකොට LAN එකේදී assign වුණ port එක Well known Port(0-1023) එකක් බවට හරවද්දී ඒ PC දෙකටම assign වෙන්නේ Port 80 ද ?

    Ports same unata (port 80) IPs 2k [Ex- 192.168.1.1:80 and other one 192.168.1.2:80] Same network ek same IPs thiyana PC 2k tiyenne naha a nisa aulak naha port same unata. Router ekata puluwan data packets request karapu PC ekata yawanna IP eka balala.

    එතකොට එකම Public IP එකක් සහ එකම Ports තියෙද්දී මේ PC දෙක Internet එකේදී වෙන වෙනම අදුනගන්නේ කොහොමද ?

    Same answer, public IP same unata source host eka wenas, (
    Private IPs wenas)
    Router eken request karana IP ekata data packets send karanwa through ports.


    Meka tawa tikak advanced but simple answer eka tama mama dunne :yes::yes:
     
    Last edited:
    • Like
    Reactions: akilaperera2014

    imhotep

    Well-known member
  • Mar 29, 2017
    14,825
    8
    35,339
    113
    Basically a NAT allows a private IP network to connect to the Internet. NAT operates on a router and translates the private IPs of the internal network to legal IP addresses when packets are sent.
    The main types of NAT are
    STATIC - where each internal device is allocated to a specific public IP address
    DYNAMIC - where each of the internal devices are allocated a pubic IP from a pool of addresses at the time of allocation.
    PAT - Port Address Translation - In this scheme only one public IP is assigned to the network. The NAT device, using the PAT method will remember the IP address and source port of the internal host.
     
    • Like
    Reactions: akilaperera2014

    akilaperera2014

    Well-known member
  • Jan 26, 2015
    1,169
    406
    83
    Kadawatha
    මේ PC දෙකේම Chrom run වෙන නිසා NAT වලින් Source IP එක Router's Public IP වලට හරවනවා. එතකොට LAN එකේදී assign වුණ port එක Well known Port(0-1023) එකක් බවට හරවද්දී ඒ PC දෙකටම assign වෙන්නේ Port 80 ද ?

    Ports same unata (port 80) IPs 2k [Ex- 192.168.1.1:80 and other one 192.168.1.2:80] Same network ek same IPs thiyana PC 2k tiyenne naha a nisa aulak naha port same unata. Router ekata puluwan data packets request karapu PC ekata yawanna IP eka balala.

    එතකොට එකම Public IP එකක් සහ එකම Ports තියෙද්දී මේ PC දෙක Internet එකේදී වෙන වෙනම අදුනගන්නේ කොහොමද ?

    Same answer, public IP same unata source host eka wenas, (
    Private IPs wenas)
    Router eken request karana IP ekata data packets send karanwa through ports.


    Meka tawa tikak advanced but simple answer eka tama mama dunne :yes::yes:


    Thanks bro! wade theruna :) Rep++
     

    akilaperera2014

    Well-known member
  • Jan 26, 2015
    1,169
    406
    83
    Kadawatha
    Basically a NAT allows a private IP network to connect to the Internet. NAT operates on a router and translates the private IPs of the internal network to legal IP addresses when packets are sent.
    The main types of NAT are
    STATIC - where each internal device is allocated to a specific public IP address
    DYNAMIC - where each of the internal devices are allocated a pubic IP from a pool of addresses at the time of allocation.
    PAT - Port Address Translation - In this scheme only one public IP is assigned to the network. The NAT device, using the PAT method will remember the IP address and source port of the internal host.

    Thanks brother! ;) ++
     

    nimesha95

    Well-known member
  • Feb 1, 2009
    1,046
    345
    83
    undisclosed location
    Basically that magic happens inside the router. Each device connected to the network has a unique ip. What router does is create a table which is called routing table to identify to whom the response from the outer network should be forwarded
     
    • Like
    Reactions: akilaperera2014