NAT - SNAT, DNAT, PAT & Port Forwarding

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024

Комментарии • 290

  • @atvid2983
    @atvid2983 2 года назад

    Thank you sir, the pace and simplicity with which you explain concepts is commendable, when In doubt or want to learn about a subject, I search with Sunny Classroom #####, #### stands for whatever network related concept I am looking for, simple and Brilliant

  • @fahadoutlook1241
    @fahadoutlook1241 3 года назад

    you are wonderful teacher.

  • @vadicheg
    @vadicheg 4 года назад +30

    wow man i watched 2 other videos had few open questions, watched your 9 minute video and everything is clear now. You are talented teacher

    • @na93r
      @na93r 3 года назад

      @Sam Darwin this is a spam

  • @parostpg
    @parostpg 4 года назад +1

    Excellent. Thank you.

  • @FahedAhmed1
    @FahedAhmed1 4 года назад

    this is great effort .. keep up the great work.

  • @AhmedNasser-ui7hd
    @AhmedNasser-ui7hd 3 года назад

    You are awesome

  • @abhikumar-vu4my
    @abhikumar-vu4my 2 года назад

    Sunny sir please upload same on D-Link switch

  • @IreshDissanayakaM
    @IreshDissanayakaM 4 года назад +129

    Everything at high level in just 9 minutes yet more than enough clarity and slowness to understand. Everything on point. This is awesome! Thank you Sunny.

  • @asyed1000
    @asyed1000 3 года назад +14

    I love how Sunny explains the brief history behind technology in his videos, since at times it is a crucial part in the learning process to understand how the technology came to be and why we need it.

  • @gautamr366
    @gautamr366 4 года назад +13

    Simply brilliant explanation! Your channel is a boon for anyone looking for good CS fundamentals. Keep it up and hope you can publish topics on Core OS concepts as well?

  • @devinmorgan4953
    @devinmorgan4953 5 лет назад +11

    EXCELLENT VIDEO!! This was the explanation that I was missing 🙌🙌🙌

  • @JoshuaNartey
    @JoshuaNartey 5 лет назад +5

    A little confused here
    Read a book where SNAT means Source Network Address Translation and DNAT means Destination Network Address Translation. The explanation you gave for PAT is what was given for DNAT.

  • @michaeleaster1815
    @michaeleaster1815 4 года назад +7

    Great video! Thank you... Though I believe 7:25 should be "is 16-bit value", not "16 digit value" ?

  • @BoosterKeagan
    @BoosterKeagan 5 лет назад +72

    Turn the speed to 1.25. Thank me later

  • @dianeventura3270
    @dianeventura3270 5 лет назад +6

    IP address conflict @ 3:49 Web Server: 192.168.100.2 and Mail Server: 192.168.100.2

    • @sunnyclassroom24
      @sunnyclassroom24  5 лет назад +8

      Thank you very much for pointing that out. I noticed this mistake after I published it. You are very detail-oriented. I appreciate it very much. I will try my best to avoid such mistakes.

  • @ЭльдарИсаев-ц1н
    @ЭльдарИсаев-ц1н Год назад +1

    i would like to say you that termin SNAT is not static nat , SNAT is source nat and DNAT is also destination nat! please be informed

  • @lounescharef2441
    @lounescharef2441 4 года назад +5

    Thank you sunny, i have been in the field for over 18 years, no one made the concepts so clear for me, You're the best! I like your chenglish toooooo.

  • @rajivraghu9857
    @rajivraghu9857 5 лет назад +7

    Thanks Sunny.. you explain stuffs so well. Wish I found these lectures during my engineering..😃

    • @sunnyclassroom24
      @sunnyclassroom24  5 лет назад +2

      You are welcome and thank you for your nice comment.

  • @bxldragonguy
    @bxldragonguy 5 лет назад +7

    Credits to you fir explaining it in such a clear and easy understanding way, thanks!

  • @londhe99
    @londhe99 6 лет назад +5

    the music at the end is epic ! it gives me recall of life in year 1980s and that time TV shows have this type of music. any way the content is best and crystal clear. good work.

    • @sunnyclassroom24
      @sunnyclassroom24  6 лет назад

      Thanks a lot for your nice comment! I appreciate your encouragement.

  • @biosah
    @biosah 2 года назад +3

    Simplicity! I love how you slowly and patiently explain complex subjects. Thank you🙏

  • @villurisatya5132
    @villurisatya5132 6 лет назад +5

    Thank you very much. Great explanation. Cold you please help us with QOS concept

  • @elisdamirchi1447
    @elisdamirchi1447 4 года назад +4

    I never write comments, but here it goes:
    Networking topics will be part of my final exam in two weeks and honestly your videos have been such a life saver.
    I hope you know you're changing lives with your content! Thank you Sir!

  • @sougata7
    @sougata7 4 года назад +4

    Awesome! Each concept clearly explained in a structured way with clearly illustrated charts. What more can one ask for? Great job!

  • @zidanetribal2343
    @zidanetribal2343 2 года назад +2

    Awesome, Sunny is my to go resource whenever I need to refresh concepts in networking, security and basically IT! Thanks again Sunny for the topnotch content :)

  • @scienceblossom6197
    @scienceblossom6197 5 лет назад +4

    I loved this video. Very high quality explanation.

  • @ImmiTheKhan
    @ImmiTheKhan 4 года назад +2

    Awesome explanation Sunny, Subscribed!

  • @limichael1519
    @limichael1519 5 лет назад +2

    Hi Sunny Love ur teaching videoes. Thanks for sharing

  • @mahikris9625
    @mahikris9625 6 месяцев назад

    how come you are using a Multicast IP@ for mapping to the outside traffic in the section PAT : local IP@ is mapped to : 234.x.x.x:8000 and 234 is in multicast range right ?

  • @FilipDomanski-wy3pt
    @FilipDomanski-wy3pt 3 месяца назад

    Source Network Address Translation (source-nat or SNAT) allows traffic from a private network to go out to the internet. Why the teacher is talking about static NAT. Am I wrong?

  • @roberth7830
    @roberth7830 3 года назад +1

    Currently learning network services and DNS. So glad to have found your channel. You provide such clear and logical explanations with helpful animations. Thank you for sharing! Subscribed!

  • @ajazio
    @ajazio Год назад

    (AT 4.30)
    DNAT does not deal with outbound traffic, it deals with inbound traffic. SNAT deals with outbound traffic

  • @biblecontext2024
    @biblecontext2024 3 месяца назад

    If my router did a PAT from port 80 to 8000, how does the other router know that I'm requesting a port 80(web) instead of 8000? Thank you.

  • @AntonSamokat
    @AntonSamokat 2 года назад

    Very good presentation! Thanks.

  • @roya2045
    @roya2045 3 года назад

    Hi Sunny I have a application running on my server its a HRMS kind of application it is accessible internally in my local lan for example if i type192.168.1.10:80 or 8080 in my browser i can access the application. But now i want this application to be accessible over the internet via specific ports like 80, 82 , 83 something like this so that people in my orginization can access it, there are 3 application on the same server. The server is assigned a a static private IP in the network. I also have a static public IP that i had taken from the ISP for this purpose. how can I configure or achieve this. Kindly help

  • @sdputurn
    @sdputurn Год назад

    thanks for video. few questions:
    1. can we say PAT is again IP masquerading?
    2. i often see people use SNAT as source NAT and DNAT as destination NAT. i am not sure which one is correct.
    thanks in advance :)

  • @dodonohoe30
    @dodonohoe30 4 года назад +1

    Hi, great video... do you have any videos on symmetric NAT? Or a clear explanation?

  • @vaibhavpawar8655
    @vaibhavpawar8655 3 года назад

    Why you are saying device is router, why you are not said this device is a FIREWALL, if the device is firewall then same working will happen or not ?

  • @davepete9537
    @davepete9537 10 месяцев назад

    Very nice explanation with animations sir, thanks. Therefore, you got me as subscriber. Do you also teach ethical hacking?

  • @technology2319
    @technology2319 2 года назад

    All types of NAT configuration: ruclips.net/video/Pp_ykBZwLUo/видео.html&ab_channel=Technology

  • @GregInHouston2
    @GregInHouston2 4 года назад

    This is okay but states that PAT is most common but I don't see how it is even useful. It shows 192.168.100.74:80 translated to 234:1.2.33:8001 but if the destination web server is not listening on 8001 then you are not going to get a desirable result.

  • @josecobo7179
    @josecobo7179 4 года назад +1

    Hi Sunny, thanks for the video. On the PAT explanation, why a common PORT of 80 was chosen instead of a random port number also known as ephemeral port? thank you

  • @thorstenk7514
    @thorstenk7514 2 года назад

    Thanks for the great video....but there is one Detail at PAT i missed... in my opinion your translation is wrong...because you translate the destination port 80 into destination port 8001. The destination port must not be changed. The Router translate the source Port and enter it in his NAT trable to identifiy the host if he get an answer from WAN

  • @crystalitsolution9583
    @crystalitsolution9583 3 года назад

    I decided to configure NAT on my ZTE MF29A router but NAT Feature is not present on the Router interface. How do I do it

  • @Helkenberg
    @Helkenberg Год назад

    Excellent video. Extremelyt Informative. Subscribed!

  • @vishalsharmahacks
    @vishalsharmahacks 7 месяцев назад

    Very Nice Explanation. Watched Many. only now all confusions are cleared

  • @Sadat146
    @Sadat146 5 месяцев назад

    best explanation of NAT can you tell me which editor are you used for these type of videos

  • @JasperPang
    @JasperPang Год назад

    Hi Sunny,can you advice how to config spectrum lan visit public server for system>

  • @sairfan06
    @sairfan06 2 года назад

    great, what i was looking for is, what if we have one public static ip and multiple web servers listing port 80 what we need under our main router to redirect each request?

  • @Mastagon
    @Mastagon 3 года назад +1

    I can't say enough good things about Sunny Classroom.

  • @saltech2024
    @saltech2024 4 года назад +1

    Awesome!!
    You are so amazing tutor

  • @naderreda2020
    @naderreda2020 4 года назад +1

    This is the best video ...... thank you...

  • @sivas4861
    @sivas4861 3 года назад

    hi great u have shown from 24 but how to calculate from like example of subnet 10.0.0.0/16 could u explain please

  • @JastenAudioVisual
    @JastenAudioVisual 5 лет назад +1

    Sir Please Discuss Link aggregation Switch, NIC Teaming , and MLAG
    vs. Stacking, Trunking ,Static Link Aggregation.....Managed and Manage
    Switch ... Thank you..

    • @sunnyclassroom24
      @sunnyclassroom24  5 лет назад

      I will do soon. Please come back to check my new videos. I will do trunking this week. I put your topics on my to-do list and I will make some videos for your some topics hopefully this month.

  • @lillones
    @lillones 2 года назад

    Is it beneficial to run DNAT on private ips on one intranet? Situations for very large networks that have a lot of remote machines connecting to a central location

  • @quisjourney3688
    @quisjourney3688 Год назад

    thank you very much for the videos, so clear, so easy to understand. Hats off 🤩

  • @StuffOffYouStuff
    @StuffOffYouStuff 4 года назад +1

    Again, the best explained video I've seen on this. Your videos are excellent. I needed a refresh. I do have a couple of clarifying questions about this. 1) Dynamic NAT - what happens if all the public IP addresses are used up? Are internal hosts denied access to the internet then? 2) PAT - If an internal host sends an outgoing packet on port 80, but the gateway then translates that to port 8001, how does the web server on the internet know you are trying to communicate with it on port 80? Thanks, Sunny.

    • @juanpasht
      @juanpasht 4 года назад +1

      Here is what I think: 1) Yes, they must be denied access until an available public IP comes out; and if not using PAT. 2) The port 80 of the internal host is NATed. The web server doesn't care about that port but the one that comes by 8001 where it will reply the request. The router-gateway receives by 8001 and translates to 80 to the internal host. The web server will never know you tried by the port 80, and doesn't matter.

  • @Fearless......
    @Fearless...... 3 года назад +1

    Give this man the nobel peace prize for teaching !

  • @seshansesha7645
    @seshansesha7645 4 года назад +1

    Simple and easy to understand... thank you

  • @ctsdeveloperx9248
    @ctsdeveloperx9248 3 года назад +1

    Great video! Thanks!

  • @elikelik3574
    @elikelik3574 6 лет назад +2

    Great video. Now I know a little bit about SNAT, DNAT, PAT but have a question =). Which IP usually ISP gives us when we as I user want to get internet at home? I think we get DNAT.You said it is expensive, but what can we do the is no another way =D By the way, I guess in this video 3:48 under the picture Mais Server's IP should be 192.168.100.4 . Thanks for help.

    • @sunnyclassroom24
      @sunnyclassroom24  6 лет назад +2

      that is correct! It is a typo and a big mistake. next time I would be more careful. Many thanks for pointing it out. I promise I won't make that stupid mistake :(.
      about your question. I guess you are right when we use the Internet at home. DNAT is expensive, but those ISP companies are rich any way (robbing all our money blindly).

    • @elikelik3574
      @elikelik3574 6 лет назад +1

      No worry, It's OK. All of us doing mistakes =)

    • @sunnyclassroom24
      @sunnyclassroom24  6 лет назад +1

      You are very detail-oriented, which I should improve. I did look at this diagram no less than 10 times , but I still missed it this obvious error :(

    • @juanpasht
      @juanpasht 4 года назад

      @@sunnyclassroom24 I guess ISPs don't use DNAT because that implies multiple public IPs. They must use PAT, only giving one public IP. and the router NATs everything by ports.

  • @janindubhanuka545
    @janindubhanuka545 3 года назад +1

    Great work my friend..

  • @じゅげむ-s6b
    @じゅげむ-s6b 10 месяцев назад

    5:54 PAT
    idk why the timeline put this together with DNAT

  • @DavidLee-b9k
    @DavidLee-b9k Месяц назад

    Johnson Donna Thompson William Martin Sharon

  • @spazthree1403
    @spazthree1403 3 года назад

    Please create more high-quality content in a paid channel !!!!

  • @JoefreyHijara
    @JoefreyHijara 3 года назад

    Watched this video at x1.25 speed. it's 1000 times better.

  • @dudinhtran3642
    @dudinhtran3642 3 года назад +1

    Very useful video, easy to understand and remember. Great job! Many thanks!

  • @AN1MATEK
    @AN1MATEK 3 года назад +1

    Sunny man you always come up when I want to learn something new about networking. Easy, clear but high quality!

  • @letdo3449
    @letdo3449 2 года назад

    very great explainations about this 🤗🤗🤗

  • @mohishrockstar
    @mohishrockstar 4 года назад +1

    If I understand it uses the TCP port number for uniqueness, now suppose one host using all the available ports (2^16 ports), then how will NATs in the router will map other hosts for incoming traffic?

    • @addanametocontinue
      @addanametocontinue 4 года назад

      The truth is that your router typically uses more than just port number to track the socket/session. It uses the source IP, sort port, destination IP, destination port. This combination of 4 data points allows it to keep track of a lot more than 65536 sessions.

    • @juanpasht
      @juanpasht 4 года назад

      @@addanametocontinue The combination in raw is: 2^32 src ips * 2^16 src ports * 2^32 dst ips * 2^16 dst ports = 2^96. But normally it is only used 1 unique public IP so it is: 1 src ip * 2^16 src ports * 2^32 dst ips * 2^16 dst ports = 2^64. But also there are some reserved and private IP that are not used as dst ips; they are about 1/8 (en.wikipedia.org/wiki/Reserved_IP_addresses) of the possible 2^32 . About the dst ports, can be used them all (like for port forwarding to one's PC- server), but normally just a few are used, like 25, 80, 443, 5228. So they may not be 2^16, but let's leave them on these 4. We have 1 srcIP * 2^16 srcPorts * (7/8) 2^32 dstIPs * 4 dstPorts = (7/8)2^50 possible combinations-sessions. They are still a lot.
      If one user is using a public IP address on its PC, then can use all those ~2^50 combinations. For a single outside-server like Facebook (with single public IP let's say), with same port 443 for example, well then yes it is 1 srcIP * 2^16 srcPorts * 1 dstIP * 1 dstport = 2^16 possible combinations-sessions; it is 65536 sessions, that, to be active, need constant activity, because if not, they expire so srcPorts can be reused. All this implies that they are still so that many so that PAT is possible. Let's say it is not a user's PC with public IP but the router with NAT-PAT -the most common form 6:04-; and that 100 devices are connected to it and all browsing Facebok (with 1 public IP address) in same port 443: They share the 65336 combinations the router can give by assigning srcPorts to them all (very improbable all 100 at same time browsing same web but who knows, though it is about 650 srcPorts for each evenly). The router will translate the internal hosts' IPs (with their ports) to all srcPorts as they are available. If, as @Mohan Gyara stated, only 1 device is exhausting the 65536 (surely only with a virus making source DoS) srcPorts, then surely no way the other 99 devices will be able to browse Facebook... but only Facebook, not all the web; without a virus it is almost imposible for 1 device or even 100 devices to exhaust the 65536 srcPorts to one single dstIP and dstPort, and single public srcIP. If the same device or other devices visit RUclips, then it is other IP and other possible combinations of 65536 srcPorts with that different dst IP and Port to be written in the router's NAT table.

  • @zhenwang123
    @zhenwang123 4 года назад +1

    Great video. It is very clear and detailed. Much easier to understand. Thank you Sunny.

  • @metasivalindowris5642
    @metasivalindowris5642 6 лет назад +3

    thank u master...

  • @grott0
    @grott0 Год назад

    Thank you! Very good explanation.

  • @pattygq
    @pattygq 9 месяцев назад

    Excellent content as always. Thanks Sunny!

  • @arthurimona5901
    @arthurimona5901 5 лет назад +2

    Great explanation. Thanks a lot!

  • @mokodo_
    @mokodo_ Год назад

    Your videos are amazing, thank you

  • @simonzhou8416
    @simonzhou8416 4 года назад +1

    Very clear, better than my expensive cissp textbook!

  • @armandobarragang
    @armandobarragang 4 года назад +1

    Sunny, simple and excelent explication. Thanks

  • @codeyao9796
    @codeyao9796 3 года назад

    There is a typo in the mail server ip. It shall be 192.168.100.4

  • @te4683
    @te4683 Год назад

    Love youre videos. Thx for sharing

  • @LeirbagIII
    @LeirbagIII Месяц назад

    Simple and very well explained. I get back to Sunny anytime I need to review the basics of any topic. Thanks Sunny!

  • @mr.b5678
    @mr.b5678 2 года назад

    Best on the web explanation. thanks bud

  • @lukevandam7610
    @lukevandam7610 Год назад

    Love you sunny. such helpful vidz

  • @jamesj9744
    @jamesj9744 2 месяца назад

    Whenever my Udemy instructors are being jive turkeys, I always look up Sunny's Classroom for a clear explanation. This guy is the best!

  • @Dertgyhud
    @Dertgyhud 4 года назад +1

    Excellent video!

  • @MRSa-tw6ut
    @MRSa-tw6ut 5 лет назад +1

    Very informative, many thanks.

  • @akeelsalman7202
    @akeelsalman7202 5 лет назад +1

    Another perfect video... Thanks Sunny

  • @chino9468
    @chino9468 5 лет назад +1

    So does that mean PAT is essentially a socket????

  • @realtebo
    @realtebo 3 года назад

    Really good video. If I understand well, what at my home I am doing in my router is only a simple port forwarding.
    SNAT and DNAT are used at ISP level?
    Or every home router is using ? and if yes,. .. can yuo explain me how?

  • @DG-zu4iy
    @DG-zu4iy 2 года назад

    That moment when you search on youtube and cross your fingers a video with Sunny shows up in the results feed- BINGO! oh Thank Jesus....press PLAY! 😂

  • @tomcat2512
    @tomcat2512 Год назад

    Thank you for this interesting video. It enhances my understanding of NAT. I realized that this video was made quite some time and CGNAT is not yet widely used back then. With the advent of the use of CGNAT by most ISP, it basically deactivates the use of port forwarding in a private network. Do you have a way around this? I would love to see another video on this topic. Thank you!

  • @FatimaHassan-fn1vk
    @FatimaHassan-fn1vk 6 лет назад +2

    Do we commonly use PATs or DNATs in our LAN networks?

    • @sunnyclassroom24
      @sunnyclassroom24  6 лет назад

      It depends on the size of the organization and its service.

    • @FatimaHassan-fn1vk
      @FatimaHassan-fn1vk 6 лет назад +1

      Isnt there any way of knowing which NAT we use through the ipconfig/all command or by typing any other command in the terminal?

    • @sunnyclassroom24
      @sunnyclassroom24  6 лет назад

      @@FatimaHassan-fn1vk It is possible with some more advanced software, but we cannot see from our client-side command. Please let me know if you find it.

    • @anwarahmed5342
      @anwarahmed5342 6 лет назад

      @@FatimaHassan-fn1vk
      If you're in a company using a router, you can use the show run command to see all the configuratons made to this router including NAT, of course if you have access to this router.
      If you're talking about your home private network (WLAN) using a wireless Access point, then you just go to AP's settings page to check the type of NAT you're ISP used for your network.

  • @AnshumanKumar007
    @AnshumanKumar007 Год назад

    it's quite interesting how something really helpful and seemingly innoccous has prevented transition to IPV6.

  • @ekonialancewanariu9049
    @ekonialancewanariu9049 3 года назад

    Short and sharp. I learnt alot within a short time.
    A question here please.
    If I'm using DNAT to connect, should I forget about PNAT? Or can I use them both simultaneously?

  • @Iಠ_ಠl
    @Iಠ_ಠl 3 года назад

    You are SOOOO AMAZING 🔥🔥🔥🔥

  • @technics6215
    @technics6215 Год назад

    Thank you for very clear explanation. It would be nice if you could explain how these NAT types are made in real world. I mean iptables.

  • @haritadepalli959
    @haritadepalli959 5 месяцев назад

    Excellent presentation. It is very difficult to find a similar presentation which explained the differences between the 4 concepts as clearly and as easily.

  • @PT-ww9nc
    @PT-ww9nc 6 месяцев назад

    Thank you Sunny, I have been watching many RUclips videos but they do not explained this in such a logical and simple way.

  • @komimawulikpodohouin4543
    @komimawulikpodohouin4543 3 года назад

    Everything is very clear now woooow great vidéo! Is it possible to do NAT by mapping all the adresses in a network to a public ip adress? In fact at the client side i do not know the ip adresses of his servers. i probably know he will not tell me.

  • @boblewis1287
    @boblewis1287 3 года назад

    I don't know about the thumbs down